Markdown + Astro = ❤️

Markdown is a great invention that lets us write less markup. It also handles typographical matters like converting straight apostrophes (‘) to opening or closing quotes (‘ or ‘) for us. Although Astro has built-in support for Markdown via .md files, I’d argue that your Markdown experience can be enhanced Read more…

hypot()

The hypot() function takes a list of values and returns the square root of the sum of their squares. .hypotenuse { width: hypot(30vmin, 40vmin); /* 50vmin */ } Most of the time, we’ll pass it two arguments: hypot(A, B). Think of it like a way to complete the Pythagorean theorem where we give Read more…

The Radio State Machine

Managing state in CSS is not exactly the most obvious thing in the world, and to be honest, it is not always the best choice either. If an interaction carries business logic, needs persistence, depends on data, or has to coordinate multiple moving parts, JavaScript is usually the right tool Read more…

saturate()

The CSS saturate() function increases or decreases an element’s color saturation level, or in other words, the intensity of the element’s color. The saturate() is used alongside the filter or backdrop-filter properties. img { filter: saturate(200%); } CodePen Embed Fallback The CSS saturate() function is defined in the Filter Effects Module Level 1 specification. Syntax The saturate() function’s formal syntax is given as: <saturate()> Read more…