A responsive card with no media queries
Flexbox cards can break the moment you throw a big image at them. Here's how flex-basis, flex-wrap and `min-inline-size: 0` work together to keep an intrinsic card layout resilient, with no media queries.
Flexbox cards can break the moment you throw a big image at them. Here's how flex-basis, flex-wrap and `min-inline-size: 0` work together to keep an intrinsic card layout resilient, with no media queries.
Use :has() and :not() to flag components that are being used wrong, with an outline and an error message you can read right in DevTools (and that an AI reads when you paste the code into a chat).
A quick look at setting something up that picks its own number of columns based on how many children it has, using CSS: :has(), :nth-child(), and :last-child without any modifier classes, props or JavaScript.
Help support my channel I'm on some other places on the internet too! And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!
A look at the media query range syntax, comparing it to the min-width and max-width, and looking at how, in my opinion, it's much easier to use.
Fluid type with clamp() means magic numbers you have to work out every time. The new CSS progress() function makes it predictable and readable, type scales included, and the tan(atan2()) trick lets you use the same approach today in every…