Vitalik Buterin
@vitalik.eth
CSS on my blog reduced from 5875 lines to 233 lines. https://vitalik.eth.limo/css/main.css Today is a great day for simplification. All software (incl law) should do this more.
24 replies
52 recasts
365 reactions
Darryl Yeo 🛠️
@darrylyeo
Love to see it! You can do even better though – use `light-dark()` to define both light and dark variants of each CSS color variable at once, then have your JavaScript toggle set `color-scheme` to `dark` or `light` on the `<html>` element. https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/light-dark https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme
1 reply
0 recast
9 reactions
Darryl Yeo 🛠️
@darrylyeo
Also, nested CSS rules are natively supported now in all major browsers, so any long repetitive parent IDs or class names (`.markdown-body`, `#color-mode-switch`, etc) can be pared down to one instance each. https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_nesting/Using_CSS_nesting
1 reply
0 recast
4 reactions
Rafi
@rafi
Oh nice. Didn’t know it’s already widely supported
1 reply
0 recast
1 reaction
Darryl Yeo 🛠️
@darrylyeo
Interop initiative working its magic! Always thought the way web browsers come to consensus about implementing new features was quite similar to Ethereum clients. Perhaps each working group could learn a lot from each other. https://wpt.fyi/interop-2025
0 reply
0 recast
0 reaction