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: static white meter story and corrected fill colors #2965

Open
wants to merge 4 commits 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
6 changes: 6 additions & 0 deletions .changeset/lucky-jeans-happen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@spectrum-css/progressbar": patch
---

- Enforces the correct static white progress bar fill color when meter is using both the `spectrum-ProgressBar--staticWhite` class and one of the `is-positive`, `is-negative`, or `is-notice` classes.
- Adds a static white story to meter.
2 changes: 1 addition & 1 deletion components/progressbar/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
}

/* Static White */
.spectrum-ProgressBar--staticWhite {
.spectrum-ProgressBar.spectrum-ProgressBar--staticWhite {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't love that we have to increase specificity to make this work but we can address those concerns in a separate PR because it's an issue we have across the project.

.spectrum-ProgressBar-fill {
color: var(--mod-progressbar-label-and-value-white, var(--spectrum-progressbar-label-and-value-white));
background-color: var(--mod-progressbar-fill-color-white, var(--spectrum-progressbar-fill-color-white));
Expand Down
13 changes: 13 additions & 0 deletions components/progressbar/stories/meter.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,16 @@ WithForcedColors.parameters = {
modes: disableDefaultModes
},
};

export const StaticWhite = Default.bind({});
StaticWhite.tags = ["!autodocs", "!dev"];
StaticWhite.args = {
staticColor: "white",
label: "Loading your fonts, images, and icons",
value: 50,
};
StaticWhite.parameters = {
chromatic: {
modes: disableDefaultModes
},
};
Loading