Skip to content

Commit

Permalink
fix(fake-button): updated disabled styles (#2413)
Browse files Browse the repository at this point in the history
  • Loading branch information
saiponnada authored Aug 21, 2024
1 parent 108f628 commit da48437
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/fair-shoes-teach.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ebay/skin": minor
---

fix(fake-button): updated disabled styles
17 changes: 17 additions & 0 deletions dist/button/button.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ button.btn[disabled] {
);
}

a.fake-btn:not([href]),
a.fake-btn[aria-disabled="true"] {
color: var(
--link-foreground-color-disabled,
var(--color-foreground-disabled)
);
}

a.fake-btn--borderless,
button.btn--borderless {
border-color: transparent;
Expand Down Expand Up @@ -302,6 +310,10 @@ a.fake-btn--primary[aria-disabled="true"] {
--btn-primary-disabled-border-color,
var(--color-foreground-disabled)
);
color: var(
--btn-primary-foreground-color,
var(--color-foreground-on-accent)
);
}

a.fake-btn--secondary,
Expand Down Expand Up @@ -433,10 +445,15 @@ button.btn--tertiary:not([disabled], [aria-disabled="true"]):active {
}

a.fake-btn--tertiary:not([href]),
a.fake-btn--tertiary[aria-disabled="true"],
button.btn--tertiary[aria-disabled="true"]:not(
[aria-live="polite"][aria-disabled="true"]
),
button.btn--tertiary[disabled] {
border-color: var(
--expand-btn-disabled-border-color,
var(--color-stroke-disabled)
);
color: var(
--btn-tertiary-disabled-foreground-color,
var(--color-background-disabled)
Expand Down
19 changes: 18 additions & 1 deletion src/sass/button/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ button.btn[aria-disabled="true"] {
);
}

a.fake-btn:not([href]),
a.fake-btn[aria-disabled="true"] {
@include color-token(
link-foreground-color-disabled,
color-foreground-disabled
);
}

button.btn--borderless,
a.fake-btn--borderless {
border-color: transparent;
Expand Down Expand Up @@ -256,6 +264,10 @@ a.fake-btn--primary[aria-disabled="true"] {
btn-primary-disabled-border-color,
color-foreground-disabled
);
@include color-token(
btn-primary-foreground-color,
color-foreground-on-accent
);
}

button.btn--secondary,
Expand Down Expand Up @@ -394,11 +406,16 @@ button.btn--tertiary[disabled],
button.btn--tertiary[aria-disabled="true"]:not(
[aria-live="polite"][aria-disabled="true"]
),
a.fake-btn--tertiary:not([href]) {
a.fake-btn--tertiary:not([href]),
a.fake-btn--tertiary[aria-disabled="true"] {
@include color-token(
btn-tertiary-disabled-foreground-color,
color-background-disabled
);
@include border-color-token(
expand-btn-disabled-border-color,
color-stroke-disabled
);
}

button.btn--tertiary.btn--destructive,
Expand Down

0 comments on commit da48437

Please sign in to comment.