Fix strategy precedence when applied to `html`
See original GitHub issueCurrently, the assignable
option makes the themes assignable (the manner depends on the choosen strategy), but the :root
theme takes precedence if the strategy is applied to html
.
For instance, <html data-theme="dark">
won’t work because :root
will take precedence.
I didn’t realize this before because I was used to apply the strategies on body
.
- The “workaround” is to not use the strategy on
html
, but on anything else. - The fix is to modify the assignable themes’ selectors.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Precedence in CSS (When Order of CSS Matters)
The practice of critical CSS involves moving up CSS selectors into a higher chunk. The #1 chunk. The lowest-order and easiest-to-override chunk.
Read more >Cascade, specificity, and inheritance - Learn web development
The effect of CSS location. Finally, it is important to note that the precedence of a CSS declaration depends on what stylesheet and...
Read more >Assign Pricing Strategy According to Precedence
You set up the assignment matrix so it specifies the precedence to use when assigning the pricing strategy. Click Tasks > Manage Pricing...
Read more >Strategic Priority form - ServiceNow Docs
Use the Strategic Priority form to orient your organization strategic plan toward your goal.
Read more >DSCP and Precedence Values - Cisco
This section provides the DSCP and precedence values used in QoS class maps and policy maps. Commonly Used DSCP Values. Unless noted as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Well, you can use
addTheme
for it to not be a “default” theme, but if you don’t have a default theme, the plugin will throw an error.I’ll change that in the next version, it will only send a warning. You’ll have to set the theme targetable and use a name on it, and it won’t use
:root
.Will that solve your issue?
Alright. That’ll be fixed in the next version, then. 👍