Jordan Pittman aecc8521dc
v3: Remove irrelevant utility rules when matching important classes (#19030)
Fixes #18678

When given a simple plugin like this:
```js
export default {
  content: [{ raw: '!a' },],
  plugins: [
    ({ addBase }) => addBase({
      '@media (min-width: 1728px)': {
        '.a': { 'padding-top': '1rem !important' },
        '.b': { 'padding-right': '1rem !important' },
      }
    }),
  ],
}
```

If this plugin saw the utility `!a` it would correctly modify both rules
to eliminate any irrelevant classes. Unfortunately, in the case of the
2nd rule this meant it's left with an empty selector which is invalid.

We now detect this case and remove the rule if that happens.
2025-09-29 18:11:09 -04:00
..
2021-12-15 18:13:09 +01:00
2023-01-19 11:42:52 +01:00
2021-09-21 12:37:49 -04:00