395 private links
::selection ans ::backdrop does not inherit from root. So :root does not guarantee the CSS variable. The html selector does not solve this.
There is currently no global context in CSS, but root is the best workaround currently.
This is going to catch a lot of people off-guard because I, like many others, expect CSS Custom properties defined on :root to just be available everywhere.
The following discussion is there https://github.com/w3c/csswg-drafts/issues/6641
To prevent a custom behavior on Safari Mobile
Rather than helping you build a sitewide design, readable.css provides a base default that is both sensible and beautiful.
For MacOS only
-webkit-font-smoothing: antialiased;
A great CSS reset
It's not available in Firefox yet.
CSS styling has no perfect solutions but tradeoffs between the different approaches. Choose the one that fits best to the project
Usages:
- Circular menus or item lists
- Wavy layouts (DNA strands, wave)
Fancy animations
A Hz unit in CSS ?
Use them as much as possible.
Exceptions are physical placement (anchor, ...)
Another CSS reset
Drunk theme
A great summary
After 25 years, the zoom property will get a spec.
Zoom affects the box model compared to tranform: scale()
To show scrollbars only when they’re needed (while keeping space for the scrollbar if it’s added later) use the scrollbar-gutter CSS property: https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-gutter
Note it's baseline 2024, so it's useful to hide it behind the @supports media query.
Piccalilli shares links!
A janky scroll animation on focus can be solved with overflow: clip
The latest CSS features, similar to What you need to know about modern CSS (2025 edition) from Frontend Masters
-apple-visual-effect: -apple-system-glass-material;
Whoever it was at Apple that decided to make this a CSS property is a genius because it makes it incredibly easy to provide different rules based on Liquid Glass support.
But it's not documented! So we can assume Apple use the property somewhere in a WebView in order to make the web app looks like native.