Articles Tagged
Quick Hit #122
Chrome 147 becomes the first to implement the CSSPseudoElement JavaScript interface, and allow the startViewTransition() method to be called on specific elements.…
Selecting a Date Range in CSS
:nth-child()'s “n of selector” syntax does all the heavy lifting... even in the JavaScript. Styling ::search-text and Other Highlight-y Pseudo-Elements
::search-text pseudo (Chrome 144) matches are yellow while the current target (::search-text:current) is orange, but ::search-text enables us to change that. Quick Hit #85
Chrome 144 becomes the first to support ::search-text, a pseudo-element for selecting find-in-page text.…
Creating Animated, Clickable Cards With the :has() Relational Pseudo Class
The CSS :has() pseudo class is rolling out in many browsers with Chrome and Safari already fully supporting it. It’s often referred to it as “the parent selector” — as in, we can select style a parent element from a …
Single Element Loaders: The Bars
We’ve looked at spinners. We’ve looked at dots. Now we’re going to tackle another common pattern for loaders: bars. And we’re going to do the same thing in this third article of the series as we have the others …
Conditionally Styling Selected Elements in a Grid Container
Calendars, shopping carts, galleries, file explorers, and online libraries are some situations where selectable items are shown in grids (i.e. square lattices). You know, even those security checks that ask you to select all images with crosswalks or whatever.…
Single Element Loaders: The Spinner
Making CSS-only loaders is one of my favorite tasks. It’s always satisfying to look at those infinite animations. And, of course, there are lots of techniques and approaches to make them — no need to look further than CodePen to …