What is Nostr?
Cristiano Rastelli /
npub12py…x0yz
2024-12-14 10:40:15

Cristiano Rastelli on Nostr: Any #CSS experts out there that can help me solve this puzzling question about CSS ...

Any #CSS experts out there that can help me solve this puzzling question about CSS custom props, aliasing, inheritance and `:root`?

Look at this codepen: https://codepen.io/didoo/pen/OPLbROG

Why the color cascades down correctly, via the "aliased" CSS variable, when the "theming" class is applied to the `<html>` element (which is `:root` in CSS) and not when it's applied to the `<body>` element? (In the same way as the non-aliased variable works)

I don't understand: what am I missing? 🤔
Author Public Key
npub12pyqale2htmg9cayelqg3eckqynha9hw2qd2kwzy65uyv35pxgnqz6x0yz