Skip to content

Commit

Permalink
fix(button): sets default background colors; incorporates s2 migratio…
Browse files Browse the repository at this point in the history
…n fixes
  • Loading branch information
cdransf committed Sep 16, 2024
1 parent 1ff0ac7 commit 40b363b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
23 changes: 12 additions & 11 deletions components/button/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -310,12 +310,21 @@ a.spectrum-Button {
--highcontrast-button-content-color-hover: ButtonText;
--highcontrast-button-content-color-focus: ButtonText;
--highcontrast-button-content-color-down: ButtonText;
--highcontrast-button-background-color-default: ButtonFace;
--highcontrast-button-background-color-hover: ButtonFace;
--highcontrast-button-background-color-down: ButtonFace;
--highcontrast-button-background-color-focus: ButtonFace;
--highcontrast-button-background-color-disabled: ButtonFace;
--highcontrast-button-content-color-disabled: GrayText;
--highcontrast-button-border-color-disabled: GrayText;
--mod-progress-circle-track-border-color: ButtonText;
--mod-progress-circle-track-border-color-over-background: ButtonText;
--mod-progress-circle-thickness: var(--spectrum-progress-circle-thickness-medium);

.spectrum-Button-label {
forced-color-adjust: none;
}

&:focus-visible {
&::after {
forced-color-adjust: none;
Expand All @@ -331,17 +340,9 @@ a.spectrum-Button {
--highcontrast-button-background-color-hover: Highlight;
--highcontrast-button-background-color-down: Highlight;
--highcontrast-button-background-color-focus: Highlight;
--highcontrast-button-content-color-hover: ButtonFace;
--highcontrast-button-content-color-down: ButtonFace;
--highcontrast-button-content-color-focus: ButtonFace;

.spectrum-Button-label {
forced-color-adjust: none;
}
}

&.spectrum-Button--negative .spectrum-Button-label {
forced-color-adjust: none;
--highcontrast-button-content-color-hover: HighlightText;
--highcontrast-button-content-color-down: HighlightText;
--highcontrast-button-content-color-focus: HighlightText;
}
}
}
2 changes: 0 additions & 2 deletions components/button/metadata/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,11 @@
".spectrum-Button.is-selected.spectrum-Button--emphasized",
".spectrum-Button.spectrum-Button--accent",
".spectrum-Button.spectrum-Button--accent.spectrum-Button--fill",
".spectrum-Button.spectrum-Button--accent.spectrum-Button--fill .spectrum-Button-label",
".spectrum-Button.spectrum-Button--accent.spectrum-Button--outline",
".spectrum-Button.spectrum-Button--iconOnly",
".spectrum-Button.spectrum-Button--iconOnly .spectrum-Icon",
".spectrum-Button.spectrum-Button--iconOnly:after",
".spectrum-Button.spectrum-Button--negative",
".spectrum-Button.spectrum-Button--negative .spectrum-Button-label",
".spectrum-Button.spectrum-Button--negative.spectrum-Button--outline",
".spectrum-Button.spectrum-Button--primary",
".spectrum-Button.spectrum-Button--primary.spectrum-Button--outline",
Expand Down

0 comments on commit 40b363b

Please sign in to comment.