Closed itsdouges closed 8 months ago
Latest commit: 5c1b61bd3d5109c7c20d1a1669f0097cdb1dcad4
The changes in this PR will be included in the next version bump.
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
LGTM assuming that above comments are addressed 👍
Okay I've pushed up an improved implementation LMK what folks think.
Reminder for myself: make sure this doesn't affect classes that aren't defined by Compiled, just in case.
This pull request introduces a new option to Compiled for increasing the specificity of all styles generated by Compiled, without changing the class name. This enables Compiled to remain deterministic when you have styles built from two or more sources that may or may not have increased specificity turned on.
We're going to be using this for migration to XCSSProp where the platform components haven't yet been migrated to Compiled (away from Emotion). We need to ensure that styles passed through XCSSProp win over Emotion styles in a deterministic way. This was chosen over other solutions such as prepending Emotion styles to the head instead of appending as the unknown of legacy styles in Jira and beyond being unintentionally affected.
To enable set
increaseSpecificity
to true in your Compiled config:TODO