Get the number of auto-fit/auto-fill columns in CSS
The whole point of auto-fit and auto-fill is that you aren't saying how many columns to use. But if you knew how many the browser chose, you can make nice design decisions.
The definitive guide to using public CSS Custom properties to configure web components externally. Surely no one will ever write about this topic again.
Understanding CSS corner-shape and the Power of the Superellipse
The CSS corner-shape property (very new! only in Chrome Canary!) is useful in basic use cases, for advanced shape making, and the superellipse() function is *extra* powerful.
There's a newish CSS feature called hyphens that specifies how you want words to be hyphenated when the text wraps. But if you use it, you're going to need to make sure you're also correctly identifying the language. And to understand why that matters, we need to talk about words and syllables.
subgrid in CSS is really handy for getting a nice level of design detail in place, especially in terms of maintaining a nice reading line, as Andy shows in this article.
Styling the space between layout items — the gap — has typically required some clever workarounds. But a new CSS feature changes all that with just a few simple CSS properties that make it easy, yet also flexible, to display styled separators between your layout items.
Matching drop shadows across CSS, Android, iOS, Figma, and Sketch
If you’ve ever tried to implement consistent shadows across multiple platforms and design tools, you may have noticed that they don’t look the same. Thankfully, it is possible to get them all to match.
CSS Cascade Layers Vs. BEM Vs. Utility Classes: Specificity Control — Smashing Magazine
CSS can be unpredictable — and specificity is often the culprit. Victor Ayomipo breaks down how and why your styles might not behave as expected, and why understanding specificity is better than relying on `!important`.
How to have the browser pick a contrasting color in CSS
Have you ever wished you could write simple CSS to declare a color, and then have the browser figure out whether black or white should be paired with that color?
Using CSS backdrop-filter for UI Effects | CSS-Tricks
Tips and tricks on utilizing the CSS backdrop-filter property to style user interfaces. You’ll learn how to layer backdrop filters among multiple elements, and integrate them with other CSS graphical effects to create elaborate designs.
Reducing CSS complexity with the :is() pseudo-class
Last week, I finally had a reason to use the newish :is() CSS pseudo-class, and wow is it glorious!
Today, I want to show you how it can dramatically reduce selector complexity. Let’s dig in!
What :is() does The :is() pseudo-class accepts a comma-separated list of selectors, and can be used to group them together.
For example, these two selector strings do the same thing…
h1, h2, h3, h4, h5, h6 { font-weight: bold; } :is(h1, h2, h3, h4, h5, h6) { font-weight: bold; } You’re probably look at this and thinking…