0 0
WP Ad Inserter plugin
Read Time:51 Second

Ahmad Shadeed got an early jump on container queries and has a growing collection of examples based on everyday patterns.

And, if you missed it, his latest post on container queries does a wonderful job covering how they work since landing in Chrome 105 this month (we’ll see them in Safari 16 soon). Some choice highlights and takeaways:

  • Containers are defined with the container-type property. Previous demos and proposals had been using contain instead.
  • Container queries are very much like the media queries we’ve been writing all along to target the viewport size. So, rather than something like @media (min-width: 600px) {}, we have @container (min-width: 600px) {}. That should make converting many of those media queries to container queries fairly straightfoward, minus the work of figuring out the new breakpoint values.
  • We can name containers to help distinguish them in our code (e.g. container-name: blockquote).

Great job, Ahmad! And thanks for sharing!

Direct Link →

Source: https://css-tricks.com/ishadeeds-container-queries-lab/

How to deploy a RESTful API Application in Kubernetes Previous post How to deploy a RESTful API Application in Kubernetes
Comparing JAWS, NVDA, and VoiceOver Next post Comparing JAWS, NVDA, and VoiceOver

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.