Skip to content
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

fix(colorloupe): adds correct disabled styles #3453

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/slow-dogs-yawn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@spectrum-css/colorloupe": minor
---

Color loupes should not be displayed when their color handle is disabled, so this work adds the `.is-disabled` selector to color loupe's CSS, with `opacity: 0`.
4 changes: 4 additions & 0 deletions components/colorloupe/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@
transform: translate(0, 0);
opacity: 1;
}

&.is-disabled {
opacity: 0;
}
}

.spectrum-ColorLoupe-inner-border {
Expand Down
1 change: 1 addition & 0 deletions components/colorloupe/metadata/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
".spectrum-ColorLoupe-checkerboard-pattern",
".spectrum-ColorLoupe-inner-border",
".spectrum-ColorLoupe-outer-border",
".spectrum-ColorLoupe.is-disabled",
".spectrum-ColorLoupe.is-open",
".spectrum-ColorLoupe:dir(rtl)",
"[dir=\"rtl\"] .spectrum-ColorLoupe"
Expand Down
Loading