Stop Treating CSS Container Queries Like Traditional Media Queries
2026年9月16日
AI 摘要 AI 生成,可能有误
The article argues that many developers misuse CSS container queries because they assume these queries work like traditional media queries, despite container queries enjoying roughly 94% browser support while only around 41% of developers actually use them. Unlike media queries, which respond to the viewport width and ignore a component's actual context, container queries respond to the size of a component's own container, allowing styles to adapt based on the space truly available to that component. The author demonstrates with code examples that this inward-looking approach lets components like cards adjust their layout correctly even when placed in constrained spaces such as narrow grid cells on large screens.
To be completely honest with you, I missed the news when CSS Container Queries first shipped. And when I finally heard about it, my very first thought was, “Why exactly do I need this when media queries already exist?”
I’m not proud of that reaction, knowing what I know now, but it was comforting to know that I wasn’t alone. In fact, there are legions of us out there.
What baffles me is that container queries aren’t a new feature, as it currently sits at around 94% browser support. And yet, very few people are actually using it. According to the State of CSS survey, 86% of developers are aware of container queries, but only 41.4% actually use them. Surveys can be biased and not completely representative of our entire field, but this one is certainly the best indicator we’ve got.
继续阅读全文
为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。
AI 摘要The article explains how to build an effective cross-browser testing checklist from real production bugs rather than generic categories, illustrating with concrete examples how features like date parsing, 100vh/100vw viewport units, Chrome's device mode, user-agent detection, third-party cookies, and performance metrics behave inconsistently across Chrome, Edge, Firefox, and Safari on desktop and real mobile devices. It argues that useful checklist entries specify a browser/device, a condition, and an observable result, and that teams should add new entries each time a cross-browser bug escapes to production. Finally, it shows how to automate each check through CI jobs, visual regression testing, lint rules, and testing on real devices.
AI 摘要As part of a monthly tradition running for more than 15 years, this post presents a collection of December 2026 desktop wallpapers created by artists and designers from around the world, available in a wide range of screen resolutions and in versions with or without a calendar. The wallpapers cover festive and wintry themes such as gingerbread houses, snowy walks, and Christmas traditions, with each artist given full creative freedom over their design. The post invites readers to contribute their own creations for future editions.
AI 摘要SmashingConf is hosting AI 2027, a live online half-day conference on December 1, 2026, focused on how AI can improve workflows for UX designers, front-end engineers, and design system teams, without the hype. The event features practical sessions from experts including Vitaly Friedman, Anna Arteeva, Christine Vallaure, TJ Pitre, Brad Frost, and Luke Murphy, covering topics like designing AI experiences, prototyping AI functionality, Figma MCPs, AI-ready design systems, and documentation for coding agents, followed by moderated breakout rooms. Tickets cost $55 for individuals and $44 per person for teams of four or more.
AI 摘要The article, drawing on Level Access's 2026 State of Digital Accessibility Report, argues that AI has dramatically accelerated planning, design, and development in the software lifecycle while accessibility testing has lagged behind, creating a two-speed workflow. Survey data shows that AI adoption alone isn't the differentiator—organizations with mature accessibility practices (training, culture, communication) benefit most, using AI as an amplifier rather than a solution. The author recommends embedding human judgment at three checkpoints—finding issues early (via design handoffs, CI/CD gates, and assigned ownership), fixing issues while context is fresh, and documenting evidence—integrated into existing workflows so accessibility keeps pace with AI-driven development speed.
AI 摘要The article proposes a four-question audit that helps product teams decide whether an AI feature earns its place by weighing what it returns users (removed effort, caught errors, consistency) against the attention and identity costs it imposes, framed as a 'break-even line.' The four questions ask whether the feature reduces total task effort for a specific user segment, whether it beats the user's current method, whether users can realistically catch errors, and whether users will retain the judgment to detect AI mistakes after a year of use. Each question yields a concrete design condition, such as scoping features to the users they serve, adding provenance displays for low-visibility high-consequence errors, and building verification mechanisms like blind review into workflows.