---
title: "The gotchas of CSS nesting"
publication: "Frontend Focus"
issue: 597
published_at: "2023-06-14"
canonical_url: "https://frontendfoc.us/issues/597"
---

Plus one of the most intense web fonts we've ever seen, and what modern CSS enables for component-based architecture. |       

Together with [![Frontend Masters logo\](https://res.cloudinary.com/cpress/image/upload/c_fill,g_auto,w_300,h_70/e_make_transparent/co_white,e_outline:5/nk0tfdvalivacz8rw7rt.png)](https://frontendmasters.com/courses/enterprise-ui-dev/?utm_source=email&utm_medium=frontendfocus&utm_content=uidev)          

#​597 — June 14, 2023 | [Read on the web](https://frontendfoc.us/issues/597)       

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/v1686749181/eyhgf2ugmz3w22l62o6s.jpg)](https://moderncss.dev/modern-css-for-dynamic-component-based-architecture/)  

[Modern CSS for Dynamic Component-Based Architecture](https://moderncss.dev/modern-css-for-dynamic-component-based-architecture/) — Explores modern project architecture, with a focus on theming, responsive layouts, and component design. Stephanie looks at features we can use to improve code organization, digs into layout techniques (such as grid and container queries), and shares some real-world examples of context-aware components. **A solid overview of how we can now approach things thanks to growing feature parity across browsers**. 

Stephanie Eckles   

[Gotchas of CSS Nesting](https://kilianvalkhof.com/2023/css-html/the-gotchas-of-css-nesting/) — Starting with a question with a surprising answer, Kilian explains how CSS nesting can lead to unexpected results due to how specificity can change when nested CSS rules are internally translated into individual rules for application. 

Kilian Valkhof   [![\](https://copm.s3.amazonaws.com/07e29e81.jpg)](https://frontendmasters.com/courses/enterprise-ui-dev/?utm_source=email&utm_medium=frontendfocus&utm_content=uidev) 

[Enterprise UI Development: Testing & Code Quality](https://frontendmasters.com/courses/enterprise-ui-dev/?utm_source=email&utm_medium=frontendfocus&utm_content=uidev) — Managing or migrating large apps and codebases? This video course covers what you need to know to scale efficiently whilst maintaining code quality. Covers unit testing, CI pipelines, mocking, code coverage, and more. 

Frontend Masters sponsor   

[Before Your Next Frontend Pull Request, Use This Checklist](https://evilmartians.com/chronicles/before-your-next-frontend-pull-request-use-this-checklist) — Avoid common mistakes in pull requests with this checklist of seven crucial rules, covering topics from minimizing bundle size and ensuring accessibility to using semantic markup and keeping code clean. 

Nina Torgunakova   

[A Preview of Web Apps in macOS Sonoma 14 Beta](https://blog.tomayac.com/2023/06/07/web-apps-on-macos-sonoma-14-beta/) — The next version of macOS (Sonoma) will double down on the idea of well integrated, desktop-installable webapps. These apps hide their web roots by not showing any Safari UI at all. Here’s a dig around into how it works so far. 

Thomas Steiner    

**⚡️ IN BRIEF** 

- [Chrome for Testing](https://developer.chrome.com/blog/chrome-for-testing/) is a new, official Chrome 'flavor' specifically targeting web testing and automation use cases.
- The upcoming iOS 17 and macOS Sonoma will [automatically remove tracking parameters](https://9to5mac.com/2023/06/08/ios-17-link-tracking-protection/) from links you tap on (if you're in private mode).
- 🏳️‍🌈 It's Pride Month so Josh W Comeau shares [how to create a pixellated pride flag](https://www.joshwcomeau.com/animation/pride-flags/) with HTML, CSS and a touch of React.
- WebKit's MotionMark graphics benchmark is [moving to an open governance model](https://webkit.org/blog/14359/motionmark-moves-to-open-governance/).
- Support for the [single document Views Transition API](https://caniuse.com/view-transitions) is now listed on CanIUse, as is [`text-wrap: balance` support.](https://caniuse.com/css-text-wrap-balance)    

📙 **Tutorials, Articles & Opinion** 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/v1686749441/mli20ltmykecfs9kz2wp.png)](https://ishadeed.com/article/comment-component/)  

[Rebuilding a Comment Component with Modern CSS](https://ishadeed.com/article/comment-component/) — Ahmad follows up his [earlier ‘rebuilding’ article](https://ishadeed.com/article/rebuild-featured-news-modern-css/) with another looking at building a robust comment component with modern CSS (like flexbox, logical properites, `:has`, style queries, and subgrid). 

Ahmad Shadeed   

['My Custom CSS Reset'](https://www.joshwcomeau.com/css/custom-css-reset/) — We first linked this popular (and rather meticulous) post a few years back, but it’s recently been updated. Josh outlines the rationale behind his own, custom CSS reset — detailing each rule, what it does, and why you may want to use it. 

Josh W. Comeau   

[Real-World Frontend Success Stories](https://www.producthunt.com/posts/courier-inbox-inapp-notification-center/) — Discover how DroneDeploy, LaunchDarkly, and Oyster HR revolutionized their customer communications with this Notification Inbox. 

Courier.com sponsor   

[The One Key Best Practice for Container Queries](https://zellwk.com/blog/container-queries-best-practice/) — In short: “_Whenever you use container queries, make sure you wrap the element with a container element_”. 

Zell Liew   

[SVG vs Canvas: Which to Choose and Why?](https://www.jointjs.com/blog/svg-versus-canvas) — James runs through some of the key considerations (performance, accessibility, testing, etc.) behind choosing the right technology for vector graphics. 

James Williams   

[No, ‘AI’ Will Not Fix Accessibility](https://adrianroselli.com/2023/06/no-ai-will-not-fix-accessibility.html) — _"When you copy broken patterns you get broken patterns."_ 
Adrian Roselli   

[The Problem with Automatically Focusing the First Input and What to Do Instead](https://adamsilver.io/blog/the-problem-with-automatically-focusing-the-first-input-and-what-to-do-instead/) 
Adam Silver   

[Which (Natural) Languages Dominate the Internet?](https://restofworld.org/2023/internet-most-used-languages/) — The one you’re reading this in, for starters. 
Russell Brandom   

[How to Password Protect a Static HTML Page with No JS](https://shkspr.mobi/blog/2023/02/how-to-password-protect-a-static-html-page-with-no-js/) 
Terence Eden    

🧑‍💻 JOBS  

[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) — Hired makes job hunting easy-instead of chasing recruiters, companies approach you with salary details up front. Create a free profile now. 
Hired     

🔧 **Code, Tools & Resources**  [![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/v1686745288/ly3a5t9v20x6a7bbd8uc.png)](https://expensive.toys/blog/blur-vignette) 

[Blur Vignette Effect in CSS](https://expensive.toys/blog/blur-vignette) — Inspired by one of the Apple Vision Pro demos from WWDC, Artur attempted to recreate something similar using just CSS. There’s even a neat generator at the end of this blog post so you can play about with the effect yourself and grab the resulting code. 

Artur Bień   

[Realtime Colors: Visualize Your Colors on a Real Site](https://realtimecolors.com/?colors=000000-ffffff-8fb4ff-ebf1ff-ff8f94) — An interactive website that lets you choose colors for UI elements (text, background, buttons, etc.) which are applied live on the page. You can randomize the colors, generate palettes, and export in various formats. A handy way to test out your ideas. 

Realtime Colors   

[Automate Visual Tests with Chromatic—Powered by Storybook](http://chromatic.com/storybook?utm_source=frontend_focus&utm_medium=sponsorship&utm_campaign=q2_2023) — Verify visual changes and component logic on each commit. Get started with a $500 credit using code`FRONTENDFOCUS`. 

Chromatic sponsor   

[Washington Post Design System: A Growing Library of Design Tokens and Interactive Components](https://build.washingtonpost.com/) — Built specifically for the Post team but the code is MIT-licensed and each component has an ‘Open in Playroom’ link that lets you fiddle with the code in a live environment. Always interesting to see what big, public-facing teams are doing. 

Washington Post   

[Zeal: An Offline Documentation Browser for Developers](https://zealdocs.org/) — Includes docs for more than 200 technologies and is available for Windows, macOS (in the shape of its inspiration, [Dash](https://kapeli.com/dash)) and Linux. 

Oleg Shparber        

✏️ Web Font of the Week 

[Kablammo](https://fonts.withgoogle.com/kablammo) — The "_dancing font from outer space!_" A new, maximalist variable font designed by the [Vectro Type Foundry](https://www.vectrotype.com/) that has a 90s vibe and a Memphis Design sensibility. Kinda reminds me of the Rugrats intro. It's available now on Google Fonts.   

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/v1686750233/ynyixgtzrpunhhtpsonq.png)](https://fonts.withgoogle.com/kablammo) [![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/v1686750269/a0exrhanmvkn74zrlnca.png)](https://fonts.withgoogle.com/kablammo)     

📬 

**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://mastodon.social/@brandrick) & [Peter Cooper](https://twitter.com/cooperx86).
Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom 

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

[Ipx.](https://frontendfoc.us/open/597/*|UID|*?ipx=t)
