Found 7 bookmarks
Custom sorting
The :empty pseudo-class in CSS
The :empty pseudo-class in CSS
One of my favorite not-so-new aspects of CSS is the :empty pseudo-class. You can use this to target elements that have no children—either child elements or whitespace and text nodes—and style them differently than they would be otherwise. For example, imagine you have some CSS to layout items in a row using flexbox… .grid-flex { display: flex; gap: 1rem; } .grid-flex div { background-color: #ffdc00; border: 1px solid #665800; color: #665800; padding: 1rem 2rem; text-align: center; } And a row of items generated from an API or database or something.
·gomakethings.com·
The :empty pseudo-class in CSS
A Guide To Newly Supported, Modern CSS Pseudo-Class Selectors — Smashing Magazine
A Guide To Newly Supported, Modern CSS Pseudo-Class Selectors — Smashing Magazine
The CSS Working Group Editor’s Draft for [Selectors Level 4](https://drafts.csswg.org/selectors-4/) includes several pseudo-class selectors that already have proposal candidates in most modern browsers. This guide will cover ones that currently have the best support along with examples to demonstrate how you can start using them today!
·smashingmagazine.com·
A Guide To Newly Supported, Modern CSS Pseudo-Class Selectors — Smashing Magazine