-
Notifications
You must be signed in to change notification settings - Fork 198
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(picker): correct disabled state colors #2737
Conversation
🦋 Changeset detectedLatest commit: 879f00b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🚀 Deployed on https://pr-2737--spectrum-css.netlify.app |
File metricsSummaryTotal size: 4.64 MB* Table reports on changes to a package's main file. Other changes can be found in the collapsed Details section below.
Detailspicker
* Results are not gzipped or minified. * An ASCII character in UTF-8 is 8 bits or 1 byte. |
cc668b0
to
f1b7a65
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
f1b7a65
to
a822601
Compare
a822601
to
715258f
Compare
0c7341f
to
1d46acf
Compare
The following states were showing a change of colors: - Disabled + hover - Disabled + invalid + hover - Disabled + open - Disabled + open + hover This was caused by two different issues. One is that the .is-open styles had a higher specificity than some of the disabled styles. The other is that the default :hover styles are being moved farther down in the built dist file, as part of the hover media query from the postcss-hover-media-feature plugin. The hover styles with the same specificity as the disabled styles were then in a different order than intended.
Remove unused custom property picked up by stylelint.
An alernative way to fix the issues caused by the postcss-hover-media-feature plugin moving hover styles below where they should be. Moves disabled styles to the very bottom, so they come after the hover media query added during the build.
1d46acf
to
879f00b
Compare
@@ -32,7 +32,6 @@ governing permissions and limitations under the License. | |||
--spectrum-picker-spacing-bottom-to-text: var(--spectrum-component-bottom-to-text-100); | |||
--spectrum-picker-spacing-edge-to-text: var(--spectrum-component-edge-to-text-100); | |||
--spectrum-picker-spacing-edge-to-text-quiet: var(--spectrum-field-edge-to-text-quiet); | |||
--spectrum-picker-spacing-top-to-text-side-label-quiet: var(--spectrum-component-top-to-text-100); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you outline why these variables are okay to be removed in the PR description when you get a chance? I see that it's fine in the baselines but just want to have it documented for the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. It was an unused variable called out by the linter. Added to the PR description.
Description
Picker: The following states were showing a change of colors when they shouldn't:
This was caused by a few different issues. One is that that the
.spectrum-Picker:hover
styles are being moved farther down in the built dist file, as part of the hover media query from the postcss-hover-media-feature plugin. The hover styles with the same specificity as the disabled styles were then later in the order than intended and overriding the disabled styles. The other is that the.is-open
styles had a higher specificity than some of the disabled styles.This also removes an unused variable flagged by the linter,
--spectrum-picker-spacing-top-to-text-side-label-quiet
. This was used nowhere in the file or repo.CSS-754
How and where has this been tested?
Please tag yourself on the tests you've marked complete to confirm the tests have been run by someone other than the author.
Validation steps
Regression testing
Validate:
To-do list