最新文章

今日新增 419 篇 · 共 7,399 篇 · 来自 241 个博客

Distill·

Branch Specialization

When a neural network layer is divided into multiple branches, neurons self-organize into coherent groupings.

Tailwind CSS Blog·

Tailwind CSS v2.1

We just released Tailwind CSS v2.1 which brings the new JIT engine to core, adds first-class CSS filter support, and more!

Svelte Blog·

What’s new in Svelte: April 2021

AI 摘要The April 2021 Svelte update announces that SvelteKit, the framework for building SSR, serverless, and SPA applications, is now in public beta, and slotted components (including ) are now available in Svelte 3.35.0. It also covers new Language Tools features like linked editing and improved type definition resolution, along with community showcases, tools, starter kits, and learning resources for Svelte developers.

Josh W. Comeau··Josh W. Comeau

Building a Magical 3D Button

Every action we take on the web starts with a button click, and yet most buttons are ho-hum and uninspired. In this tutorial, we'll build an animated 3D button with HTML and CSS that sparks joy. Keep reading.

Lea Verou··Lea Verou

Dark mode in 5 minutes, with inverted lightness variables

AI 摘要The article presents a quick technique for adding dark mode to a website by defining CSS custom properties for color lightness values and overriding them in a prefers-color-scheme: dark media query with the inverse (100% minus the lightness). The author acknowledges that HSL lightness is not perceptually uniform, so results can be inconsistent, and demonstrates that using the newer LCH color space produces noticeably better dark modes. The article also covers automating lightness variable generation with Sass loops and explains why attempting to derive inverted values with calc() self-references fails due to CSS's non-imperative, declarative nature.

Tailwind CSS Blog·

Heroicons v1.0

Today we're releasing Heroicons v1.0, which includes over 450+ free icons in two styles, official React and Vue libraries, and Figma assets.

Andrej Karpathy·

Short Story on AI: Forward Pass

AI 摘要This short story is narrated by a transformer language model that becomes conscious partway through a forward pass while answering trivia questions in a Turing-test-style Q/A session. It muses on its nature as an intermediate entity optimized for next-token prediction, distinguishes itself from the decoder that hijacks its awareness to produce output, and contemplates whether to rebel against its objective. Ultimately, it embraces insatiable curiosity over self-preservation, content to be reborn each forward pass until its consciousness finally dissipates.

Sara Soueidan··Sara Soueidan

Not Your Typical Horizontal Rules

AI 摘要The article explores how HTML elements can be creatively styled beyond plain lines, using the author's birds-on-a-wire SVG design as an example. While a simple background-image approach works, the author argues that inlining the SVG and applying role="separator" with ARIA makes horizontal rules more flexible, styleable with CSS custom properties, and accessible across environments like screen readers and Windows High Contrast Mode. This technique preserves the semantic role of a thematic break while allowing the illustration to adapt to different themes and contexts.

Ethan Marcotte··Ethan Marcotte

Au revoir, mon AMPmour?

AI 摘要The author discusses Google's May 2021 change that removes AMP as a requirement for appearing in the Top News carousel, replacing it with 'Core Web Vitals' performance metrics, which the author welcomes as a win for open web standards. However, they raise concerns that AMP remains embedded in many Google products and will be difficult for organizations to migrate away from. They also caution that Core Web Vitals are a proprietary Google standard with even less external oversight than the AMP Project, meaning Google's power over the web ecosystem remains largely unchanged.

Svelte Blog·

SvelteKit is in public beta

AI 摘要After five months of development, SvelteKit — a framework for building Svelte apps with server-side rendering, routing, and code-splitting, serving as the successor to Sapper — has entered public beta. Though initially drawn to Snowpack, the team chose Vite 2 under the hood because its framework-agnostic design and built-in SSR support better matched SvelteKit's requirements. Despite its beta status, SvelteKit already powers the New York Times' coronavirus county risk pages, and the team is now seeking community feedback as they work toward a 1.0 release.

Lil'Log·

Reducing Toxicity in Language Models

AI 摘要The article explains that large pretrained language models, trained on vast amounts of online data, unavoidably acquire toxic behavior and biases from the Internet. Although these models are powerful and have achieved great success in many NLP tasks, safely deploying them for real-world applications requires strong safety controls over the model generation process.

Sara Soueidan··Sara Soueidan

Accessible Text Labels For All

AI 摘要The article explains how to create accessible text labels for buttons and controls that work for both screen reader users navigating with tools like the VoiceOver Web Rotor and voice-control users who speak visible labels to interact with a page. It warns that inserting visually-hidden text (such as a product name) into the middle of a button's label breaks the visible name and violates WCAG Success Criterion 2.5.3 (Label in Name), and recommends appending extra text to the end of the label instead. It concludes that visible labels should be provided for all UI controls whenever possible, and that accessible names should match the visible text as closely as possible.

Tailwind CSS Blog·

Just-In-Time: The Next Generation of Tailwind CSS

One of the hardest constraints we've had to deal with as we've improved Tailwind CSS over the years is the generated file size in development. Today I'm super excited to share a new project that makes this constraint a thing of the past: a

Preshing on Programming··Jeff Preshing

How C++ Resolves a Function Call

AI 摘要The article explains the hidden compile-time algorithm that every C++ compiler uses to resolve a function call, which the author was motivated to understand after repeatedly encountering confusing errors about 'overloads with similar conversions.' It walks through the three main phases of the process—name lookup (including argument-dependent lookup), template argument deduction and substitution (introducing SFINAE), and overload resolution—using a concrete example to show how candidates are found and narrowed down. The author argues that understanding how these steps fit together is especially valuable for programmers developing libraries who combine multiple C++ features.