-
Notifications
You must be signed in to change notification settings - Fork 1
refactor(css): logical property audit — replace physical with logical equivalents #321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
bb22fb4
684c0cb
57f9cc6
a14a9dd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -1052,7 +1052,7 @@ and a short description. The machine-readable companion (with all columns) is | |||||
| | `.sf-scrim--bottom` | PUBLIC | macro | Scrim | text anchored at the top | | ||||||
| | `.sf-scrim--full` | PUBLIC | macro | Scrim | text anchored at the bottom (default) | | ||||||
| | `.sf-scrim--top` | PUBLIC | macro | Scrim | Lift content above the scrim, but leave media below it so the gradient actually darkens the picture. | | ||||||
| | `.sf-scroll-shadow` | PUBLIC | macro | Scroll shadow | Top + bottom mask gradient that reveals when content is scrolled inside a vertical-scroll container. Pure CSS, no JS. Combine with overflow-y: auto on the same element. Override: style="--sf-scroll-shadow-size: 3rem" | | ||||||
| | `.sf-scroll-shadow` | PUBLIC | macro | Scroll shadow | Top + bottom mask gradient that reveals when content is scrolled inside a vertical-scroll container. Pure CSS, no JS. Combine with overflow-block: auto on the same element. Override: style="--sf-scroll-shadow-size: 3rem" | | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use block-axis wording here. The description still uses physical-axis phrasing (“vertical-scroll”, “top + bottom”), which is misleading in a logical-property audit. Please reword it in block-axis terms so the docs stay correct for vertical writing modes. ♻️ Suggested wording- Top + bottom mask gradient that reveals when content is scrolled inside a vertical-scroll container.
+ Block-axis mask gradient that reveals when content is scrolled inside a block-scroll container.📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| | `.sf-scroll-snap` | PUBLIC | macro | Scroll snap | Vertical scroll-snap container for vertically stacked sections. Pairs with consumer-supplied scroll-snap-align on children. For horizontal snap, use the .sf-reel layout primitive. | | ||||||
| | `.sf-surface` | PUBLIC | macro | Surface | Generic surface macro. Set --sf-surface-color on an element with .sf-surface to derive background, auto-contrast foreground, and contextual surface tokens. 11 precomputed variants (.sf-surface--primary through .sf-surface--danger) cover all brand + status + inverse colors.… | | ||||||
| | `.sf-surface--action` | PUBLIC | macro | Surface | Generic surface macro. Set --sf-surface-color on an element with .sf-surface to derive background, auto-contrast foreground, and contextual surface tokens. 11 precomputed variants (.sf-surface--primary through .sf-surface--danger) cover all brand + status + inverse colors.… | | ||||||
|
|
||||||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,119 @@ | ||
| { | ||
| "colors.light": { | ||
| "--sf-color-text": { | ||
| "r": 2, | ||
| "g": 6, | ||
| "b": 15 | ||
| }, | ||
| "--sf-color-heading": { | ||
| "r": 2, | ||
| "g": 6, | ||
| "b": 15 | ||
| }, | ||
| "--sf-color-link": { | ||
| "r": 0, | ||
| "g": 85, | ||
| "b": 180 | ||
| }, | ||
| "--sf-color-bg": { | ||
| "r": 245, | ||
| "g": 249, | ||
| "b": 252 | ||
| }, | ||
| "--sf-color-primary": { | ||
| "r": 1, | ||
| "g": 55, | ||
| "b": 238 | ||
| }, | ||
| "--sf-color-secondary": { | ||
| "r": 17, | ||
| "g": 26, | ||
| "b": 45 | ||
| }, | ||
| "--sf-color-action": { | ||
| "r": 0, | ||
| "g": 108, | ||
| "b": 204 | ||
| }, | ||
| "--sf-color-border": { | ||
| "r": 210, | ||
| "g": 212, | ||
| "b": 216 | ||
| }, | ||
| "--sf-color-text--muted": { | ||
| "r": 97, | ||
| "g": 105, | ||
| "b": 120 | ||
| }, | ||
| "--sf-color-text--on-primary": { | ||
| "r": 238, | ||
| "g": 238, | ||
| "b": 238 | ||
| } | ||
| }, | ||
| "colors.dark": { | ||
| "--sf-color-text": { | ||
| "r": 227, | ||
| "g": 236, | ||
| "b": 251 | ||
| }, | ||
| "--sf-color-heading": { | ||
| "r": 227, | ||
| "g": 236, | ||
| "b": 251 | ||
| }, | ||
| "--sf-color-link": { | ||
| "r": 0, | ||
| "g": 173, | ||
| "b": 255 | ||
| }, | ||
| "--sf-color-bg": { | ||
| "r": 30, | ||
| "g": 31, | ||
| "b": 33 | ||
| }, | ||
| "--sf-color-primary": { | ||
| "r": 81, | ||
| "g": 150, | ||
| "b": 255 | ||
| }, | ||
| "--sf-color-secondary": { | ||
| "r": 191, | ||
| "g": 203, | ||
| "b": 227 | ||
| }, | ||
| "--sf-color-action": { | ||
| "r": 0, | ||
| "g": 173, | ||
| "b": 255 | ||
| }, | ||
| "--sf-color-border": { | ||
| "r": 67, | ||
| "g": 69, | ||
| "b": 72 | ||
| }, | ||
| "--sf-color-text--muted": { | ||
| "r": 147, | ||
| "g": 156, | ||
| "b": 170 | ||
| }, | ||
| "--sf-color-text--on-primary": { | ||
| "r": 3, | ||
| "g": 3, | ||
| "b": 3 | ||
| } | ||
| }, | ||
| "raw": { | ||
| "--sf-text-m": "calc(clamp(calc(1 * 1rem), calc((1.25 - 1) / (90 - 22.5) * (100vw - 22.5 * 1rem) + 1 * 1rem), calc(1.25 * 1rem)) * 1)", | ||
| "--sf-text-s": "calc(clamp(calc(1 * pow(1.25, -1) * 1rem), calc((1.25 * pow(1.333, -1) - 1 * pow(1.25, -1)) / (90 - 22.5) * (100vw - 22.5 * 1rem) + 1 * pow(1.25, -1) * 1rem), calc(1.25 * pow(1.333, -1) * 1rem)) * 1)", | ||
| "--sf-text-l": "calc(clamp(calc(1 * pow(1.25, 1) * 1rem), calc((1.25 * pow(1.333, 1) - 1 * pow(1.25, 1)) / (90 - 22.5) * (100vw - 22.5 * 1rem) + 1 * pow(1.25, 1) * 1rem), calc(1.25 * pow(1.333, 1) * 1rem)) * 1)", | ||
| "--sf-h1-size": "calc(clamp(calc(1 * pow(1.25, 5) * 1rem), calc((1.25 * pow(1.333, 5) - 1 * pow(1.25, 5)) / (90 - 22.5) * (100vw - 22.5 * 1rem) + 1 * pow(1.25, 5) * 1rem), calc(1.25 * pow(1.333, 5) * 1rem)) * 1)", | ||
| "--sf-space-m": "calc(clamp(calc(1 * 1rem), calc((2 - 1) / (90 - 22.5) * (100vw - 22.5 * 1rem) + 1 * 1rem), calc(2 * 1rem)) * 1)", | ||
| "--sf-space-l": "calc(clamp(calc(1 * pow(1.25, 1) * 1rem), calc((2 * pow(1.333, 1) - 1 * pow(1.25, 1)) / (90 - 22.5) * (100vw - 22.5 * 1rem) + 1 * pow(1.25, 1) * 1rem), calc(2 * pow(1.333, 1) * 1rem)) * 1)", | ||
| "--sf-gap": "calc(clamp(calc(1 * 1rem), calc((2 - 1) / (90 - 22.5) * (100vw - 22.5 * 1rem) + 1 * 1rem), calc(2 * 1rem)) * 1)", | ||
| "--sf-radius-m": "calc(8px * 1)", | ||
| "--sf-border-width-1": "1px", | ||
| "--sf-font-weight-normal": "400", | ||
| "--sf-font-weight-bold": "700" | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test expects
scrollSnapTypeto contain'y', butscroll-snap-type: blockcomputes differently.The test at
tests/macros.spec.js:154-169assertsexpect(cs).toContain('y')for.sf-scroll-snap. However,scroll-snap-type: block mandatorycomputes to'block mandatory'ingetComputedStyle(), not'y mandatory'. The test will fail unless updated to check for'block'instead of'y'.🤖 Prompt for AI Agents