Search

:has() is “The God Selector”

By Chris Coyier on

I’m such a :has() selector fanboy in CSS. We’ve covered it many times. But Bruce Lawson goes as far as to call it “The God Selector” because: [It] is omnipotent because it doesn’t require any structural relationship between the thing being checked and the thing being styled. In other words, you can select any element […]

CSS-in-JS Round 2

By Chris Coyier on

Good observation in Bytes: … new CSS-in-JS libraries are popping up like it’s 2017 all over again. Panda came out last summer, Meta open-sourced StyleX in December, Material UI released PigmentCSS last month, and Restyle just launched a few weeks ago. It’s likely that server-side rendering screwed up the original “batch” of these tools. That, and, ya know, just using CSS is […]

Single CSS Keyframe Tricks are Magic

By Chris Coyier on

What happens with a CSS @keyframe animation like this when called? There is only one “keyframe” there at 50%. So what happens at 0% through the animation? The scale property is… whatever it already was. And at 100%? Back to whatever it already was. Assuming the default scale of 1, it will grow the element […]