From 96b67eb7543c4cbf4fe80d5bf2392fd6f136d9b1 Mon Sep 17 00:00:00 2001 From: Josh Winn <965114+jawinn@users.noreply.github.com> Date: Fri, 10 May 2024 16:04:12 -0400 Subject: [PATCH] build: keep selector list in dist output of not pseudo-class (#2740) 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. --- .changeset/eight-spiders-help.md | 11 +++++++++++ postcss.config.js | 1 - 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .changeset/eight-spiders-help.md diff --git a/.changeset/eight-spiders-help.md b/.changeset/eight-spiders-help.md new file mode 100644 index 00000000000..c916b2e375c --- /dev/null +++ b/.changeset/eight-spiders-help.md @@ -0,0 +1,11 @@ +--- +"@spectrum-css/calendar": patch +"@spectrum-css/combobox": patch +"@spectrum-css/datepicker": patch +"@spectrum-css/menu": patch +"@spectrum-css/picker": patch +"@spectrum-css/slider": patch +"@spectrum-css/stepper": patch +--- + +Build change to remove the `postcss-preset-env` polyfill for the dist output of `:not` selectors containing multiple selectors, to avoid an unintended increase in specificity, which caused some visual regressions. diff --git a/postcss.config.js b/postcss.config.js index df94f0a64b6..46d441e08f5 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -118,7 +118,6 @@ module.exports = ({ // https://github.com/jsxtools/focus-within "focus-within-pseudo-class": true, "font-format-keywords": true, - "not-pseudo-class": true, "opacity-percentage": true, // https://github.com/csstools/postcss-plugins/tree/main/plugins/css-prefers-color-scheme "prefers-color-scheme-query": true,