Skip to content

Commit

Permalink
feat(utility): added image disabled utility class (#2363)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtBlue authored and agliga committed Jul 29, 2024
1 parent a96f2ac commit 2cbfe64
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/healthy-kangaroos-wait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ebay/skin": minor
---

feat(utility): added image disabled utility class
2 changes: 1 addition & 1 deletion dist/icon/icon.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ svg.icon--64-colored {
height: 64px;
}
svg.icon--disabled {
filter: var(--color-icon-disabled-filter);
filter: var(--color-media-disabled-filter);
}
svg.icon--attention-filled {
color: var(--color-foreground-attention);
Expand Down
2 changes: 1 addition & 1 deletion dist/phone-input/phone-input.css
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@

.phone-input--disabled span.fflag,
.phone-input--disabled svg.flag {
filter: var(--color-icon-disabled-filter);
filter: var(--color-media-disabled-filter);
}

.phone-input--disabled .textbox {
Expand Down
2 changes: 1 addition & 1 deletion dist/tokens/evo-light.css
Original file line number Diff line number Diff line change
Expand Up @@ -183,5 +183,5 @@
var(--color-ai-solid-green-subtle) 66%,
var(--color-ai-solid-green-subtle) 100%
);
--color-icon-disabled-filter: grayscale(1) opacity(0.25);
--color-media-disabled-filter: grayscale(1) opacity(0.25);
}
4 changes: 4 additions & 0 deletions dist/utility/utility.css
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@
object-fit: contain;
}

.image-disabled {
filter: var(--color-media-disabled-filter);
}

.text-truncate {
overflow: hidden;
text-overflow: ellipsis;
Expand Down
4 changes: 4 additions & 0 deletions docs/_includes/utility.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ <h2><span class="secondary-text">@ebay/skin/</span>utility</h2>
<td>.image-scale</td>
<td>Image will scale up and down</td>
</tr>
<tr>
<td>.image-disabled</td>
<td>Image will appear disabled.</td>
</tr>
<tr>
<td>.text-truncate</td>
<td>Truncate single-line text</td>
Expand Down
2 changes: 1 addition & 1 deletion src/sass/icon/icon.scss
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ svg {
}

&.icon--disabled {
filter: var(--color-icon-disabled-filter);
filter: var(--color-media-disabled-filter);
}
&.icon--attention-filled {
@include color-token(color-foreground-attention);
Expand Down
2 changes: 1 addition & 1 deletion src/sass/phone-input/phone-input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@

.phone-input--disabled span.fflag,
.phone-input--disabled svg.flag {
filter: var(--color-icon-disabled-filter);
filter: var(--color-media-disabled-filter);
}

.phone-input--disabled .textbox {
Expand Down
4 changes: 4 additions & 0 deletions src/sass/utility/utility.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@
@include image-treatment(16px);
}

.image-disabled {
filter: var(--color-media-disabled-filter);
}

.text-truncate {
overflow: hidden;
text-overflow: ellipsis;
Expand Down
2 changes: 1 addition & 1 deletion src/tokens/evo-light.css
Original file line number Diff line number Diff line change
Expand Up @@ -183,5 +183,5 @@
var(--color-ai-solid-green-subtle) 66%,
var(--color-ai-solid-green-subtle) 100%
);
--color-icon-disabled-filter: grayscale(1) opacity(0.25);
--color-media-disabled-filter: grayscale(1) opacity(0.25);
}

0 comments on commit 2cbfe64

Please sign in to comment.