Responsive design and container queries? Oh my!

Ethan Marcotte · 2021年5月28日

AI 摘要 AI 生成,可能有误

Marking the eleventh anniversary of his original 'Responsive Web Design' article, the author discusses how container queries—a long-wished-for CSS feature—may finally become a reality, with an experimental implementation now available in Chrome Canary thanks to the work of Miriam Suzanne, Nicole Sullivan, and others. He argues that a layout using container queries instead of media queries still qualifies as responsive design, proposing that responsive layouts be defined by fluid grids, flexible images, and some combination of both query types. Ultimately, he reflects that responsive design has been continuously reinvented by the community's ongoing experiments and discussions ever since his original article, and he's excited to see where it goes next.

As it happens, the original “Responsive Web Design” article turned eleven this week. After hitting a milestone anniversary last year I wasn’t planning to write anything to commemorate it — how would one write a happy eleventh birthday post? — but quite a bit’s happened in the last year. 1 Namely, it looks as though container queries might finally become reality.

I’ve written about container queries before — twice before, in fact, because it’s the thing I’ve wished was available in CSS. As my designs have become more component-based, media queries have felt like an increasingly creaky tool. After all, using the shape of the viewport to determine how individual modules should change and adapt? It feels…weird.

That’s where container queries come in. Once they’re finished 2, they’ll allow us to look at how much space a given element has available to it, and then write rules to adapt that element accordingly. And thanks to the efforts of Miriam Suzanne, Nicole Sullivan, and many others, there’s an experimental implementation of container queries available in Canary, the nightly developer release of Google Chrome.

继续阅读全文

为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。

更多来自 Ethan Marcotte

The ship is anchor’d safe and sound.

AI 摘要The author reflects on the news of Sir Patrick Stewart's death, recalling how he grew up watching Star Trek with his father and how Jean-Luc Picard's quiet, empathetic leadership gradually won him over as he matured. He describes Picard's compassion and moral clarity as his first model of true leadership, and notes that his grief is entwined with nostalgia for the safe, happy hours spent watching the show as a child. Though he never met Stewart, the author says he will carry his gratitude for the actor with him.

All watched over by algorithms of loving grace.

AI 摘要The author expresses deep frustration with recommendation engines that relentlessly push more of whatever a user has just watched or listened to, filling feeds with predictable content like stadium concerts, sports highlights, and endless sleep-sound albums. They argue that despite enormous amounts of data, math, and capital, these systems merely deliver 'the content equivalent of beige, flavorless paste'—the most average, boring output possible. This realization, the author quips, suddenly makes the 'artificial intelligence' industry make a lot more sense.

Folded between the pages.

AI 摘要After adding a disclosure statement about how 'artificial intelligence' is (or isn't) used on their newly redesigned website, the author discovered a broader tradition of similar 'AI statements' published by other designers, writers, and organizations. They compiled a selection of these statements, noting that they are ultimately less about AI itself and more about each author's values, their relationship to their work, and the tools they use. The featured statements range from complete refusal to sparing, selective use of AI, reflecting diverse views on ethics, craft, and authenticity.

49.

AI 摘要In this journal entry, the author celebrates his 49th birthday in Boston after a week-long heat wave finally breaks, giving him a cool morning he treats as the perfect gift. After opening presents and hearing from friends and family, he goes for a slow, enjoyable run along the Charles River, pausing to take a selfie at the emergency room where he received a diagnosis years ago. The run prompts reflection on the decade he's closing—career changes, a book about labor in tech, old and new friends, loss and laughter—and on his partner, who has been with him throughout it all.

The house is valuable because it is the house.

AI 摘要The author describes a redesign of his personal website, launched quietly after 15 months, aimed at simplifying layouts and adding warmth through warmer colors, new typography, and a calmer, single-column reading experience. He reflects on the self-doubt he faced during the unglamorous finishing work, including a novel worry that his design might resemble the emerging aesthetic of LLM-generated websites. After taking some space following the launch, he has reconnected with the parts of the design he first loved and is happy with the result, feeling a bit like coming home.