-
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
build: keep selector list in dist output of not pseudo-class #2740
Conversation
🦋 Changeset detectedLatest commit: 8980ebb The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
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 |
File metricsSummaryTotal size: 4.48 MB* Table reports on changes to a package's main file. Other changes can be found in the collapsed Details section below.
Detailscalendar
combobox
datepicker
menu
picker
slider
stepper
* Results are not gzipped or minified. * An ASCII character in UTF-8 is 8 bits or 1 byte. |
🚀 Deployed on https://pr-2740--spectrum-css.netlify.app |
0204d7e
to
52cc8fa
Compare
A change in configuration had resulted in some regressions due to increased specificity created in the dist output of :not selectors. One issue was with a disabled Menu item showing a change in icon color on hover. The config override being removed here sets it back to the default stage 2 configuration that allows multiple comma separated selectors within :not(). The configuration had been converting each item in the :not selector list into its own :not selector, increasing specificity for each additional item.
52cc8fa
to
8980ebb
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.
This solves the hover icon issue and appears to be updating those selectors with :not()
correctly, nice work! 🎉
A change in configuration had resulted in some regressions due to increased specificity created in the dist output of :not selectors. One issue was with a disabled Menu item showing a change in icon color on hover. The config override being removed here sets it back to the default stage 2 configuration that allows multiple comma separated selectors within :not(). The configuration had been converting each item in the :not selector list into its own :not selector, increasing specificity for each additional item.
A change in configuration had resulted in some regressions due to increased specificity created in the dist output of :not selectors. One issue was with a disabled Menu item showing a change in icon color on hover. The config override being removed here sets it back to the default stage 2 configuration that allows multiple comma separated selectors within :not(). The configuration had been converting each item in the :not selector list into its own :not selector, increasing specificity for each additional item.
A change in configuration had resulted in some regressions due to increased specificity created in the dist output of :not selectors. One issue was with a disabled Menu item showing a change in icon color on hover. The config override being removed here sets it back to the default stage 2 configuration that allows multiple comma separated selectors within :not(). The configuration had been converting each item in the :not selector list into its own :not selector, increasing specificity for each additional item.
Description
A change in the build configuration had resulted in some regressions due to increased specificity created in the dist output of
:not
selectors. One issue was with a disabled Menu item showing a change in icon color on hover.The postcss-preset-env config override being removed here sets it to the default stage 2 configuration that allows multiple comma separated selectors within
:not()
. The configuration had been using a polyfill that converted each item in the:not
selector list into its own:not
selector, increasing specificity for the rule for each additional item.Example:
Selector in dist CSS before this change:
.spectrum-Menu-item:hover > .spectrum-Menu-itemIcon:not(.spectrum-Menu-chevron):not(.spectrum-Menu-checkmark)
Selector in dist CSS after this change (and that was generated in previous Menu 6.1.5). This is how the not selector is written in the source index.css:
.spectrum-Menu-item:hover>.spectrum-Menu-itemIcon:not(.spectrum-Menu-chevron,.spectrum-Menu-checkmark)
CSS-755
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
:not(.class1):not(.class2)
when defined as:not(.class, .class2)
. Tip: runyarn compare
locally to see the dist changes in the 7 affected components.Regression testing
Validate:
Screenshots
Bug noticed on the current state of Menu docs in main. When hovering over the disabled "Share link", the color of the icon changed:

To-do list