CSS by T. Afif :verified: on Nostr: 💡 CSS Tip! To target the html element, you either use "html {}" or ":root {}" but ...
💡 CSS Tip!
To target the html element, you either use "html {}" or ":root {}" but thanks to CSS nesting you can simply use "& {}"
When used alone, the nesting selector will match the root element!
A one-character selector 🤯
⚠️ It has a lower specificity than html and :root
Online Version: https://css-tip.com/root-selector/
#CSS #HTML
To target the html element, you either use "html {}" or ":root {}" but thanks to CSS nesting you can simply use "& {}"
When used alone, the nesting selector will match the root element!
A one-character selector 🤯
⚠️ It has a lower specificity than html and :root
Online Version: https://css-tip.com/root-selector/
#CSS #HTML
![](https://cdn.masto.host/frontendsocial/media_attachments/files/112/394/401/257/756/857/original/c84217c68c40753a.png)