question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fix strategy precedence when applied to `html`

See original GitHub issue

Currently, 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:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
innocenzicommented, Aug 18, 2020

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?

0reactions
innocenzicommented, Aug 18, 2020

Alright. That’ll be fixed in the next version, then. 👍

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found