Using the Custom Highlight API
You can get your hands on ranges of text in JavaScript, then apply a named “highlight” on them, so you can style that range in CSS with no other selector necessary.
You can get your hands on ranges of text in JavaScript, then apply a named “highlight” on them, so you can style that range in CSS with no other selector necessary.
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.
A row of logos that animate forever perfectly and don’t have any duplicated HTML or JavaScript at all is quite a trick. Thanks modern CSS!
Best bet: just always use them.
More nuanced take: there is a few situations where using the physical property is still releavant.
It’s a complicated look! There may or may not be blurring, light refracts in tricky ways, the highlights are quite bright, and you’ve got to be very careful about text contrast accessibility.
When an image isn’t “full width”, but you want that caption underneath to wrap at the end of the image.
Zustand is a minimal, but fun and effective state management library which just may improve your render performance.
A single button, but it has two different behaviors in JavaScript depending on how far you’ve scrolled in an element (as determined by CSS!)
A look at what happens when you add a whole list of transforms to an element, and how that interacts with `animation-composition`.
The last part of this series is taking our site that we’ve got in GitHub and addng an Astro build process to it, then mapping a domain we own to the Netlify-hosted site.
Frontend Masters donates to open source projects through thanks.dev and Open Collective, as well as donates to non-profits like The Last Mile, Annie Canons, and Vets Who Code.