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 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.
This is like one of those weirdly difficult quizzes about CSS. If you’ve got a <p> element sitting there in a totally normal basic HTML layout, then this CSS: What color does the <p> render as? It’s blue. You might think it’s green, as the value blah is an invalid color. If the CSS had… […]
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.
A look at what happens when you add a whole list of transforms to an element, and how that interacts with `animation-composition`.
It’s pretty straightforward to animate list items into new positions, but there is a few tricks when the specific one you’ve chosen to move needs a *different* transition.
I know that you can “chain” the CSS property filter, like: All three of those filters will apply. But somehow I never thought about applying the same filter more than once. That also works, and they don’t override each other, they “stack” (or whatever you want to call it). So here’s some useless bar trivia […]
Hot off the presses! Firefox Nightly adds the new :heading pseudo! Easily style all headings, or use nth-child-like AnB syntax to select a range of headings! Needs layout.css.heading-selector.enabled flag enabled. Keith Cirkel Demo.
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.