Skip to content

Commit

Permalink
chore(tag): adjust custom property order to resolve lint violations (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
cdransf authored Oct 23, 2024
1 parent 092aac5 commit 25ddd5e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/hungry-cougars-end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@spectrum-css/tag": patch
---

Reorder rules and custom properties to resolve lint violations.
14 changes: 7 additions & 7 deletions components/tag/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,11 @@

/* clear button */
.spectrum-Tag-clearButton {
/* width of fill neutralized to ensure correct inline spacing within tag */
--mod-clear-button-width: fit-content;
--spectrum-clearbutton-fill-size: fit-content;
--spectrum-clearbutton-fill-background-color: transparent;

box-sizing: border-box;

padding-block-start: calc(var(--mod-tag-clear-button-spacing-block, var(--spectrum-tag-clear-button-spacing-block)) - var(--mod-tag-border-width, var(--spectrum-tag-border-width)));
Expand All @@ -241,11 +246,6 @@
/* ensure clear button is correct color */
color: currentColor;

/* width of fill neutralized to ensure correct inline spacing within tag */
--mod-clear-button-width: fit-content;
--spectrum-clearbutton-fill-size: fit-content;
--spectrum-clearbutton-fill-background-color: transparent;

.spectrum-ClearButton-fill {
background-color: var(--mod-clearbutton-fill-background-color, var(--spectrum-clearbutton-fill-background-color));

Expand Down Expand Up @@ -416,8 +416,6 @@
/* windows high contrast mode */
@media (forced-colors: active) {
.spectrum-Tag {
forced-color-adjust: none;

--highcontrast-tag-border-color: ButtonText;
--highcontrast-tag-border-color-hover: ButtonText;
--highcontrast-tag-border-color-active: ButtonText;
Expand All @@ -435,6 +433,8 @@

--highcontrast-tag-focus-ring-color: Highlight;

forced-color-adjust: none;

&.is-selected {
--highcontrast-tag-border-color-selected: Highlight;
--highcontrast-tag-border-color-selected-hover: Highlight;
Expand Down

0 comments on commit 25ddd5e

Please sign in to comment.