Trying to figure out which feature is splitting up rules #1323
-
There are a lot of places in my css like this: I can't think of any reason why splitting these rules into two copies of the exact same selector improves browser compatibility. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @Banner-Keith, That is impossible to tell because you only provide screenshots. No code we can copy/paste and no config we can verify. You are also showing a diff in output but you aren't showing the input diff. Did you change the source code, add plugins, remove plugins, updated plugins? In fact, your post doesn't even include a question 🤔 It would be neat if we were clairvoyant, but then we would likely use our powers for more interesting things 😄 |
Beta Was this translation helpful? Give feedback.
That is fine :D
Thank you for the extra info.
Do you happen to use cascade layers?
One of the steps in the cascade layers polyfill plugin is to separate important and non-important styles into separate rules. This is done because important styles have different behavior than non-important styles.
As far as I can tell from your screenshot all the split rules are along important vs. non-important styles.
If this is caused by cascade layers then it is needed and useful even if it seems redundant.
The cascade layers polyfill in general adds a lot of extra stuff and assumes that you use gzip or other compression steps to reduce the impact of that.
It also assumes that it wont be needed foreve…