---
title: "Here's what Container Query Units can do"
publication: "Frontend Focus"
issue: 509
published_at: "2021-09-22"
canonical_url: "https://frontendfoc.us/issues/509"
---

Plus more CSS Paint API exploration, and an animated gradient background generator. |           

[![\](https://res.cloudinary.com/cpress/image/upload/v1602675575/hhmdxfk96fnbq3effjk1.png)](https://frontendfoc.us/)   

Frontend Focus 

#​509 — September 22, 2021 | [Read on the web](https://frontendfoc.us/issues/509)       

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/v1632307670/jv7qrfmnfub55psmditq.jpg)](https://ishadeed.com/article/container-query-units/)  

[CSS Container Query Units](https://ishadeed.com/article/container-query-units/) — I’ll start by saying that CSS container queries are _currently_ [only supported](https://caniuse.com/css-container-queries) via an experimental flag in Chrome, Edge, and Opera. However it’s always worth staying ahead with these sorts of things — Ahmad digs into the benefits. 

Ahmad Shadeed   

[30 Seconds of CSS: Useful CSS Snippets You Can Understand Quickly](https://www.30secondsofcode.org/css/p/1) — We linked to the first version of this a few years ago but it’s been updated and more than doubled in size since then. It’s a handy collection of CSS snippets for various situations like [hover menus](https://www.30secondsofcode.org/css/s/image-hover-menu) or[dynamic shadows.](https://www.30secondsofcode.org/css/s/dynamic-shadow) 

30 seconds of code   [![\](https://copm.s3.amazonaws.com/7387a4f9.png)](https://userfront.com) 

[Auth Without Complexity](https://userfront.com) — They’ve re-engineered authentication and access control from the ground up to remove all the complexity. Check out examples for React, Vue, Node.js and more. 

Userfront sponsor   

[Optimizing Images on the Web](https://blog.cloudflare.com/optimizing-images/) — Cloudflare has [a new testing tool](https://images.cloudflare.com/) for highlighting possible improvements you can make in delivering images to visitors. This post highlights what those improvements are (think format, size, quality, etc). 

Greg Brimble (Cloudflare)     

**⚡️ Quick bits:** 

- 📅 Registration for the **PWA Summit** (_taking place in two weeks_) [is now open](https://pwasummit.org/register/). It's a free online event organized by Google, Microsoft, Samsung, and Intel.
- [Here's what's new in DevTools for Chrome 95](https://developer.chrome.com/blog/new-in-devtools-95/), including new CSS length authoring tools.
- You can now [test sites using a three-digit User-Agent string](https://miketaylr.com/posts/2021/09/chrome-version-100-testing.html) (such as Version 100) via a Chromium flag.
- Did you know the [EyeDropper API is now in Chrome](https://css-tricks.com/eyedropper-api-dropped/) (95+)?
- Stephanie Stimac of the Microsoft Edge team is hosting a free [session looking at the future of HTML controls](https://cfe.dev/events/future-of-html-controls/). It takes place tomorrow.
- Here's another event taking place tomorrow — Inclusive Design 24. It's a 24-hour free online event highlighting inclusive design and sharing ideas on and around that topic. [Here's the schedule](https://inclusivedesign24.org/2021/schedule/).
- Should the `<img>` tag [have a download attribute](https://twitter.com/jaffathecake/status/1436254336078819340), just like `<a>` can?   

📙 **Tutorials, Articles & Opinion**  

[The Future of CSS: Cascade Layers (CSS`@layer`)](https://www.bram.us/2021/09/15/the-future-of-css-cascade-layers-css-at-layer/) — “_When authoring CSS we have to carefully think about how we write and structure our code. Cascade Layers aim to ease this task_.” 

Bramus Van Damme   

[How to Record Audio Using the MediaStream API](https://www.sitepoint.com/mediastream-api-record-audio/) — A practical introduction to using the Media Capture and Streams API to record audio from an end user’s microphone then do something with it. 

Shahed Nasser   

▶[Default Focus Outlines: Don’t Remove Them](https://a11yrules.com/podcast/default-focus-outlines-dont-remove-them/) — Accessibility experts discuss the importance of the default focus style 

A11y Rules podcast   

[Chrome Is The New Safari. And So Are Edge and Firefox](https://nielsleenheer.com/articles/2021/chrome-is-the-new-safari-and-so-are-edge-and-firefox/) — Thoughts on the long standing WebKit-only browser landscape on iOS. 

Niels Leenheer opinion  

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/v1632314295/u1r54fsvexoztxsjzuvk.png)](https://web.dev/building-a-split-button-component/)  

[Building a Split-Button Component](https://web.dev/building-a-split-button-component/) — A foundational overview of how to build an accessible split-button component. 

Adam Argyle   

[Troubleshoot Frontend Performance Incidents Faster with Datadog](https://www.datadoghq.com/dg/real-user-monitoring/frontend-performance/?utm_source=Advertisement&utm_medium=CooperPress&utm_campaign=CooperPress-FrontEndFocusS) — Monitor page load times with First Contentful Paint, DOM Content Loaded, Time to Interactive, and other frontend metrics. 

Datadog sponsor   

[Exploring the CSS Paint API: Polygon Border](https://css-tricks.com/exploring-the-css-paint-api-polygon-border/) — Here's the latest entry in a series exploring the CSS Paint API, this time looking at how to go about adding a border to a `clip-path`. 

Temani Afif   

[Make Microsoft Edge DevTools 'Your Own'](https://blogs.windows.com/msedgedev/2021/09/14/edge-devtools-93-personalization/) — A nice look at the ways you can make Edge’s DevTools suit your own preferenes. 

Microsoft Edge Team   

[Small Bundles, Fast Pages: What To Do With Too Much JavaScript](https://calibreapp.com/blog/bundle-size-optimization) — Bundle size matters and this post touches on a few ways to monitor and improve it. 

Ben Schwarz (Calibre)   

[Web Quality Assurance: From User Requirements to Web Risk Management](https://www.smashingmagazine.com/2021/09/journey-into-web-quality-assurance/) — Elie Sloïm has spent the last 20 years thinking about web quality assurance, asking “_What does quality mean for a web user_?”. This article explains everything he has learned along the way. 

Smashing Magazine   

[Seven Practical Uses for the `::before` and `::after` Pseudo-Elements in CSS](https://css-tricks.com/7-practical-uses-for-the-before-and-after-pseudo-elements-in-css/) 
Habdul Hazeez   

[How to Detect If The User's OS Prefers Dark Mode and Change Your Site with CSS and JS](https://www.hanselman.com/blog/how-to-detect-if-the-users-os-prefers-dark-mode-and-change-your-site-with-css-and-js) 
Scott Hanselman   

[How to Write About Web Performance](https://nolanlawson.com/2021/09/12/how-to-write-about-web-performance/) 
Nolan Lawson    

Jobs  

[Walmart is Hiring Software Engineers](http://wmtcareers.com/l5ct) — Work where one line of code can help millions of people save money and live better. 
Walmart Global Tech   

[Frontend Developer at X-Team (Remote)](https://x-team.com/remote-frontend-developer-jobs/?utm_source=cooperpress&utm_medium=email-ad&utm_campaign=cooperpress-frontend&utm_content=frontend) — Join the most energizing community for developers and work on long-term projects for Riot Games, FOX, Sony, Coinbase, and more. 
X-Team   

[Find Frontend Engineering Jobs with Hired](https://hired.com/join/?utm_source=newsletter&utm_medium=sponsor&utm_campaign=%28b2c%29%28l-all%29%28r-all%29%28cooper-frontendfocus%29&utm_content=find-your-next-job) — Create a profile on Hired to connect with hiring managers at growing startups and Fortune 500 companies. It's free for job-seekers. 
Hired     

🔧 **Code, Tools and Resources** 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/v1632320848/jojvzc1zhp8lwbiubjqz.png)](https://mechanic.design/)  

[Mechanic](https://mechanic.design/) — An open source framework that claims to make it easy to create custom, web-based design tools that export design assets right in your browser. 

Design Systems International   

[Animated Gradient Background Generator](https://animated-gradient-background-generator.netlify.app/) — You can edit the color stops, angle, and speed of the animation, which works by animating the background-position property 

John Polacek   [![\](https://res.cloudinary.com/cpress/image/upload/v1632316228/zpojpk18djsiila7xpwl.png)](https://patterns.helloyes.dev/) 

[Basic Pattern Repository](https://patterns.helloyes.dev/) — A nice collection of straightforward SVG patterns. 

Thomas Michael Semmler   

[html-to-react: A Lightweight Library That Converts Raw HTML to a React DOM Structure](https://github.com/aknuds1/html-to-react) 

Arve Knudsen   

[Free Chat/Messaging UI Kits for Your Website or App](https://getstream.io/chat/ui-kit/?utm_source=frontend_focus&utm_medium=promoted_newsletter&utm_content=developer&utm_campaign=09_22_2021) 

Stream sponsor   

[Atrament.js 2.0: A Library for Smooth Drawing on HTML Canvas](https://github.com/jakubfiala/atrament.js) 

Jakub Fiala  

🖌 _...and finally_ 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/v1632224331/dxyyrto7cdtr45ic82ov.png)](https://www.monkeyuser.com/2021/new-library/) 

Comic shared with kind permission from [Monkey User.](https://www.monkeyuser.com/2021/new-library)   

📬 

**Got a new email address?** You can [change your email here](https://frontendfoc.us/edit_subscription/*|UID|*). 

--- 

**Bored of us?** Click [here to stop getting this newsletter](https://frontendfoc.us/leave/*|UID|*). 

--- 

**Got a link for us?** Reply and tell us. We can't include everything but we'll take a look. 

--- 

Published by Cooper Press Ltd.
Curated by [Chris Brandrick](https://twitter.com/chrisbrandrick) & [Peter Cooper](https://twitter.com/peterc).
Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom 

[Stop getting this newsletter](https://frontendfoc.us/leave/*|UID|*)
