-
Notifications
You must be signed in to change notification settings - Fork 658
fix: replace deprecated CSS custom properties with new names + old as fallback #7758
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
base: main
Are you sure you want to change the base?
Changes from all commits
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 |
|---|---|---|
| @@ -1,11 +1,15 @@ | ||
| // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
|
||
| exports[`postcss-preset-primer > css nesting 1`] = `".selector[data-active]{color:var(--fgColor-active)}"`; | ||
| exports[`postcss-preset-primer > css nesting 1`] = `".selector[data-active]{color:var(--fgColor-active)}"` | ||
|
|
||
| exports[`postcss-preset-primer > mixins > @mixin activeIndicatorLine 1`] = `".selector{background:var(--borderColor-accent-emphasis,var(--color-accent-emphasis));border-radius:var(--borderRadius-medium,.375rem);content:"";height:calc(100% - var(--base-size-8,.5rem));left:calc(var(--base-size-8,.5rem)*-1);position:absolute;top:var(--base-size-4,.25rem);width:var(--base-size-4,.25rem)}"`; | ||
| exports[`postcss-preset-primer > mixins > @mixin activeIndicatorLine 1`] = | ||
| `".selector{background:var(--borderColor-accent-emphasis,var(--color-accent-emphasis));border-radius:var(--borderRadius-medium,.375rem);content:"";height:calc(100% - var(--base-size-8,.5rem));left:calc(var(--base-size-8,.5rem)*-1);position:absolute;top:var(--base-size-4,.25rem);width:var(--base-size-4,.25rem)}"` | ||
|
|
||
| exports[`postcss-preset-primer > mixins > @mixin buttonReset 1`] = `".selector{align-items:center;appearance:none;background:none;border:0;color:inherit;cursor:pointer;display:inline-flex;font:inherit;margin:0;padding:0;text-align:start}.selector::-moz-focus-inner{border:0}"`; | ||
| exports[`postcss-preset-primer > mixins > @mixin buttonReset 1`] = | ||
| `".selector{align-items:center;appearance:none;background:none;border:0;color:inherit;cursor:pointer;display:inline-flex;font:inherit;margin:0;padding:0;text-align:start}.selector::-moz-focus-inner{border:0}"` | ||
|
|
||
| exports[`postcss-preset-primer > mixins > @mixin focusOutline 1`] = `".selector{box-shadow:none;outline:2px solid var(--focus-outlineColor,var(--color-accent-fg));outline-offset:-2px}"`; | ||
| exports[`postcss-preset-primer > mixins > @mixin focusOutline 1`] = | ||
| `".selector{box-shadow:none;outline:2px solid var(--focus-outline-color,var(--focus-outlineColor,var(--color-accent-fg)));outline-offset:-2px}"` | ||
|
|
||
| exports[`postcss-preset-primer > mixins > @mixin focusOutlineOnEmphasis 1`] = `".selector{box-shadow:inset 0 0 0 3px var(--fgColor-onEmphasis,var(--color-fg-on-emphasis));outline:2px solid var(--focus-outlineColor,var(--color-accent-fg));outline-offset:-2px}"`; | ||
| exports[`postcss-preset-primer > mixins > @mixin focusOutlineOnEmphasis 1`] = | ||
| `".selector{box-shadow:inset 0 0 0 3px var(--fgColor-onEmphasis,var(--color-fg-on-emphasis));outline:2px solid var(--focus-outline-color,var(--focus-outlineColor,var(--color-accent-fg)));outline-offset:-2px}"` | ||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -1,5 +1,6 @@ | ||||||||
| /* outline with fg box-shadow for buttons */ | ||||||||
| @define-mixin focusOutlineOnEmphasis $outlineOffset: -2px, $outlineColor: var(--focus-outlineColor) { | ||||||||
| @define-mixin focusOutlineOnEmphasis $outlineOffset: -2px, | ||||||||
| $outlineColor: var(--focus-outline-color, var(--focus-outlineColor)) { | ||||||||
|
Comment on lines
+2
to
+3
|
||||||||
| @define-mixin focusOutlineOnEmphasis $outlineOffset: -2px, | |
| $outlineColor: var(--focus-outline-color, var(--focus-outlineColor)) { | |
| @define-mixin focusOutlineOnEmphasis $outlineOffset: -2px, $outlineColor: var(--focus-outline-color, var(--focus-outlineColor)) { |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -16,6 +16,6 @@ | |||||
|
|
||||||
| .CustomActionListItem[data-is-active-descendant='activated-directly'] { | ||||||
| background-color: transparent; | ||||||
| outline: 2px solid var(--focus-outlineColor, var(--color-accent-emphasis)); | ||||||
| outline: 2px solid var(--focus-outline-color, var(--focus-outlineColor)); | ||||||
|
Contributor
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.
Suggested change
|
||||||
| outline-offset: -2px; | ||||||
| } | ||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -77,7 +77,7 @@ | |||||
|
|
||||||
| /* Focus styles */ | ||||||
| &:focus-visible { | ||||||
| outline: 2px solid var(--focus-outlineColor); | ||||||
| outline: 2px solid var(--focus-outline-color, var(--focus-outlineColor)); | ||||||
|
Contributor
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.
Suggested change
|
||||||
| outline-offset: 3px; | ||||||
| } | ||||||
|
|
||||||
|
|
||||||
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.
The snapshot update includes unrelated formatting churn (line wrapping / semicolon removal) for snapshots whose CSS output didn’t change. To keep diffs focused and reduce merge conflicts, consider reverting those purely-formatting changes and only updating the snapshot strings that actually changed due to the new focus outline token chain.