fix: expose anchor size CSS variables - #336
Draft
draedful wants to merge 1 commit into
Draft
Conversation
Reviewer's GuideThis PR centralizes default anchor sizing on the graph wrapper via CSS variables, updates the anchor styles to always consume those variables directly (no fallbacks), documents how to size anchors, and adds Playwright coverage to verify default and overridden anchor dimensions via CSS custom properties. File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
|
Preview is ready. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--graph-block-anchor-widthand--graph-block-anchor-heightvalues on the graph wrapperRoot cause
Anchor coordinates were exposed as concrete CSS custom-property values, while width and height existed only as fallbacks inside
var(...). As a result, consumers could not read default values from the custom properties and CSS processing could emit duplicate width and height declarations.Impact
The rendered anchor size remains
16px × 16pxby default. Consumers can continue overriding either dimension through the CSS cascade; no inline values are introduced.Validation
CI=1 npx playwright test e2e/tests/anchor/anchor-css-variables.spec.tsnpm run typechecknpm run lintnpm test -- --runInBandgit diff --checkFixes #329
Summary by Sourcery
Expose and default anchor size CSS variables while documenting and testing their usage.
Bug Fixes:
Enhancements:
Documentation:
Tests: