最新文章

今日新增 420 篇 · 共 7,401 篇 · 来自 241 个博客

Ethan Marcotte··Ethan Marcotte

Responsive design and container queries? Oh my!

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.

Marc Brooker·

Metastability and Distributed Systems

AI 摘要The article discusses metastable failures in distributed systems, in which a trigger such as a load spike or deployment pushes a system into a stable-but-useless state—high throughput but zero goodput—that persists even after the trigger is removed. Reviewing Bronson et al.'s paper 'Metastable Failures in Distributed Systems,' the author agrees that the sustaining feedback loop, rather than the initial trigger, should be treated as the root cause, and highlights mitigations like autoscaling, serverless platforms, and organizational awareness of how optimizations such as retries can increase vulnerability. The author suggests that viewing large-scale distributed systems through the lens of control theory and dynamical systems could lead to fundamentally stable designs, and recommends the paper to anyone building, operating, or researching such systems.

Lea Verou··Lea Verou

Is the current tab active?

AI 摘要The author describes their quest to determine whether the current browser tab is active for their Inspire.js presenter mode plugin, showing that common approaches like the Visibility API, focus/blur events, and document.activeElement all fall short because visibility and active state are orthogonal, and events only signal changes rather than current state. After concluding there was no general solution, they implemented a workaround using focus/blur listeners and knowledge of the paired window, though an edit notes that document.hasFocus()—when called asynchronously rather than synchronously in the console—turned out to be the answer. The takeaway is that deceptively simple questions on the Web Platform may lack good answers, and sometimes solving your specific case is better than chasing a general one.

Sara Soueidan··Sara Soueidan

A couple of ways to highlight code syntax in Apple Keynote slides

AI 摘要Apple Keynote lacks built-in code syntax highlighting, but the author shares two workarounds: copying code from VS Code, which preserves formatting when pasted (provided the editor.copyWithSyntaxHighlighting setting is enabled), and using Roman Nurik's Slides Code Highlighter web tool. The author hopes Apple will eventually add native syntax highlighting, but these two approaches offer quick and practical alternatives for developers creating presentation slides.

Lea Verou··Lea Verou

82% of developers get this 3 line CSS quiz wrong

AI 摘要The author shares a CSS quiz about how the `revert` keyword behaves with custom properties, which 82% of Twitter poll respondents answered incorrectly—voting for orange instead of the correct answer, skyblue. The correct result occurs because `revert` cancels author styles, and since custom properties are inherited by default, the value defined on `:root` (skyblue) trickles back in. Even Tab Atkins, editor of the CSS Variables spec, admitted to getting the answer wrong, and the article further notes that registering a custom property with an initial value still prevents the `var()` fallback from triggering.

Elixir Blog··José Valim

Elixir v1.12 released

Elixir v1.12 is out with improvements to scripting, tighter Erlang/OTP 24 integration, stepped ranges, and dozen of new functions across the standard library.

Ethan Marcotte··Ethan Marcotte

Union.

AI 摘要The article recounts the Basecamp controversy, in which management unilaterally banned political discussions, dissolved employee committees (including the DE&I committee), and cut benefits, prompting roughly a third of the workforce to resign. Framing the episode as fundamentally a story about power, the author argues that tech workers should unionize to counterbalance employer power and collectively bargain for better pay, protections, and working conditions. He calls for solidarity with all industry workers, including rideshare drivers, content moderators, and contractors, whose labor has long been undervalued and insecure.

Sara Soueidan··Sara Soueidan

Design for reading: tips for optimizing content for Reader modes and reading apps

AI 摘要The article argues that web content must remain understandable even when CSS is stripped away, as happens in Reader modes and reading apps, making progressive enhancement essential to resilient design. The author offers practical tips: provide markup-only alternatives for ideas that depend on CSS to be understood, keep real content in HTML rather than CSS pseudo-elements, and hide non-core content such as ads and author bios using the HTML hidden attribute so it doesn't clutter the reading experience. Ultimately, keeping content in the markup layer ensures a decent experience for users regardless of how they choose to consume it.

Sara Soueidan··Sara Soueidan

Component-level art direction with CSS Container Queries

AI 摘要The article explores how CSS Container Queries can be used for component-level art direction, allowing images to adapt their aspect ratio and cropping based on the size of their container rather than the viewport. Using object-fit and aspect-ratio, images can flexibly fit components, but true art direction (swapping entirely different images) requires the element, which currently only responds to viewport-based media queries. The author advocates for Container Queries support in HTML so semantic images inside components can respond to their container's size, noting that for now this is only possible with non-semantic background images in CSS.

Jay Alammar·

Explainable AI Cheat Sheet

Introducing the Explainable AI Cheat Sheet, your high-level guide to the set of tools and methods that helps humans understand AI/ML models and their predictions. I introduce the cheat sheet in this brief video: