tailwindlabs

tailwindcss

A utility-first CSS framework for rapid UI development.

by tailwindlabs

TypeScript

TypeScript80.4%
Rust17.4%
JavaScript0.8%
CSS0.6%
HTML0.6%
Haml0.4%

Commit activity

Last 12 weeks · 79 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
62
✓README✓License✓Contributing○Code of Conduct○Issue Template✓PR Template

Recent PRs & issues

Active · Last activity 2d ago
See all on GitHub →
Mwrnk

Summary and are missing from in . The list has every other CSS Values 4 math function, and both places that use it skip these two: No whitespace is added around operators inside them. A delay that grows from the middle item, , generates . The browser can't read as a subtraction, so every item gets (instead of for ). generates , which is dropped as invalid. doesn't see them, so the value is not inferred as a length. generates instead of , while already generates . This adds both names to the list. I found this while reading , not in a project. Both functions are Baseline 2025 (Chrome 138, Firefox 118, Safari 15.4). Test plan Added and cases, alone and nested in , to the math operator table in , and to the existing test in . All five fail on (e.g. , and in the snapshot) and pass with this change. : 45 files, 5405 tests passed. Compiled the classes above on and on this branch, and loaded the CSS in Chrome 156. On the delay is and the is dropped. On this branch the delay is , the width is , and the font size is for . on the changed files, and . Not run: and the integration tests, since I don't have the Rust toolchain set up here. The change is in the TypeScript core only.

Mwrnk · 5h ago
suasgn

Summary only has a threaded build. In browsers it needs , which is only available on cross-origin isolated pages (COOP/COEP headers), so the scanner can't run on most pages. This adds a separate single-threaded build for browsers: loads it with non-shared memory and scans an in-memory filesystem (memfs), exported as and . Scanning runs on the calling thread. The pinned NAPI CLI only builds , so builds the module with Cargo directly, and links emnapi's single-threaded archive. The script reads the artifact path from Cargo's JSON output, and fails the build when the module doesn't link against the memory that creates. The field of now points to , and the package ships types (, ). The threaded browser loader (, ) is still published, so code that imports it by path, for example on cross-origin isolated pages, keeps working. gets a entry that re-exports the browser build. now runs , so CI, the release workflows and CONTRIBUTING.md install the target. The Node.js and native builds are unchanged. Related Addresses the browser part of #11610: using Oxide on play.tailwindcss.com, and the errors when loading in a browser. The edge runtimes from the original question (e.g. Deno Deploy) are not tested. An alternative to #18292, which builds for with wasm-bindgen. This PR does not change the scanner code, because Rayon runs on the calling thread on . It exposes the same API as Node.js instead of separate types, and supports over memfs. A build without the WASI runtime may be smaller. Test plan : new Playwright tests (Chromium, Firefox, WebKit) serve the bundled entry without COOP/COEP headers. They check candidate extraction, UTF-16 positions, memfs discovery with incremental rescans, and use from an application-owned worker. One test makes throw, to check that the build never creates workers. : a new test loads the browser entry of the packed package in Node.js with removed. , with the default target directory and with set to another directory. Both copy the fresh module. Linked the module against memory that is too small, and against shared memory, to check that the build rejects both. works without . 🤖 Generated with Claude Code

suasgn · 6h ago
Sudhakar7J

Summary Fixes #20706. only iterates its candidates, and only reads its sources, but their public types required mutable arrays. Code holding either as a array had to copy it into a mutable one first. : now takes in both and . : is generated as via . Added type-level regression tests for both public types. Added a changelog entry. Mutable arrays remain assignable to arrays, so this is backwards compatible. Test plan — 268 passed. — clean (package-scoped check). — clean. — clean. Built and confirmed the generated now declares . The new type-level tests assign arrays to both APIs, so they fail to type-check against the previous mutable signatures and pass with this change. Notes The attribute only changes the generated TypeScript declaration; the Rust field remains , so there is no runtime change.

Sudhakar7J · 17h ago
RobinMalfait

Summary When the nesting of a rule is flattened, each is replaced with the parent selector, and each selector in a selector list without gets the parent selector as a prefix. Stacked variants therefore multiply the length of the selectors. A pathological candidate like doubles the CSS with each variant: Selector lists (, or ) and custom variants with multiple s grow in the same way. The scanner extracts such candidates from any text, so a single class name in a source file (or in a page that uses ) is enough to stop the build. This PR estimates the length of the flattened selectors of a candidate after its variants are applied, without generating them, and discards the candidate when the estimate is above 1,000,000 characters. The candidate is then invalid, like an unknown utility. The estimate is computed for each node as , where is the length of the parent selector. This makes it linear in the size of the AST, also when variants with multiple s re-use the same nodes. It stays within about 2× of the real output for the patterns above. The limit is far above real candidates: The largest estimate in the test suite (882,614 compiled candidates) is 1,737 characters. from is about 8,000, and about 35,000 with 10 variants. Just below the limit, a candidate still compiles in about 20 ms, with up to about 0.6 MB of CSS. The generated CSS of candidates below the limit does not change. Test plan Added a test that , , a selector list variant and a variant with two s, each stacked 20 times, generate nothing. Without the limit, the test runs out of memory. Added snapshots for , and , which still compile. stacked 20 times now takes 1 ms instead of running out of memory. Compiling 93,144 candidates (all classes, with and without variants) on a cold design system takes about 65 ms more for the estimate (about 0.7 µs per candidate). Compiled candidates are cached, so a rebuild does not repeat it. and pass.

RobinMalfait · 4h ago
darrenfdes

Summary Vite's URL rewriter warns when a PostCSS declaration has no source file. In development, converts Tailwind's AST directly to PostCSS nodes. The keyframes created from JavaScript theme configs lack source locations, so their declarations trigger the warning even when Vite supplied for the input stylesheet. Keep the source of each keyframe as configs are merged and attach it to the generated rule and its children. This gives PostCSS the source of the or directive that contributed the keyframe. Related to #20452. The case reproduced here uses a JavaScript config with and its matching animation utility. Test plan Confirmed the regression test fails on with missing source files and passes with this change. It covers keyframes from a base config and a separate extension config. Ran and . Verified a Vite 8.2.0 dev stylesheet transform with emits the configured keyframes and no longer logs the missing warning.

darrenfdes · 1d ago
Structured data for AI agents

Repository: tailwindlabs/tailwindcss. Description: A utility-first CSS framework for rapid UI development. Stars: 98598, Forks: 6389. Primary language: TypeScript. Languages: TypeScript (80.4%), Rust (17.4%), JavaScript (0.8%), CSS (0.6%), HTML (0.6%). License: MIT. Homepage: https://tailwindcss.com/ Topics: css, css-framework, functional-css, postcss, responsive, tailwindcss, utility-classes. Latest release: v4.3.5 (1w ago). Open PRs: 80, open issues: 46. Last activity: 2d ago. Community health: 62%. Top contributors: adamwathan, RobinMalfait, depfu[bot], thecrypticace, dependabot-preview[bot], reinink, philipp-spiess, bradlc, dependabot-support, MichaelDeBoey and others.