NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm, #5494 most downloaded on npm
A CSS parser, transformer, and minifier written in Rust
Latest stable
1.33.0
Last release 4 months ago
20 Jul 2026
Ships fairly regularly
a new release about every 2 months
Most releases are documented
notes for 22 of 26 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
26 releases · first in 2023
Drag across the ruler to compare, or tap a release to open it.
Add support for ::highlight by @lucasweng in https://github.com/parcel-bundler/lightningcss/pull/970
::highlight by @lucasweng in https://github.com/parcel-bundler/lightningcss/pull/970:target-before/after/current pseudo-class by @yisibl in https://github.com/parcel-bundler/lightningcss/pull/1185atty with std::io::IsTerminal by @fkeiler in https://github.com/parcel-bundler/lightningcss/pull/1197external to return type of resolve by @sapphi-red in https://github.com/parcel-bundler/lightningcss/pull/1261Your coding agent can read these notes before it upgrades. Set up the MCP server →
Enable custom resolvers to mark imports as external. Resolvers may now return {external: string} to mark an import as external. This will leave the @i
{external: string} to mark an import as external. This will leave the @import in the output CSS instead of bundling it. See the docs for details.addDependency function as an option. Dependencies may be used by tools that call Lightning CSS such as bundlers to implement file watching or caching. See the docs for details.mix-blend-mode property supportcolor-scheme keywords as-is instead of normaltransform valuesvar(--foo,) and env(--foo,)scale property or scale() to a numberNothing published for this version
Implement scroll-state container queries
<string> in @property syntaxmigrate to maintained library instead of deprecated `paste`
Fixed crash on process exit when lightningcss was loaded inside a Node.js worker thread on Linux
Fixed crash on process exit when lightningcss was loaded inside a Node.js worker thread on Linux
Note that this was technically a breaking change in the spec. You may need to update code using relative color calculations on percentages to use numb…
@supports rules when already nested in a @supports rule – #878, d398c1b86439dfd243a6c2ba627a8e7981118a44Support for ::details-content and ::target-text selectors – @philipp-spiess in https://github.com/parcel-bundler/lightningcss/pull/930
::details-content and ::target-text selectors – @philipp-spiess in https://github.com/parcel-bundler/lightningcss/pull/930:placeholder-shown selector name across browsers – @Marukome0743 in https://github.com/parcel-bundler/lightningcss/pull/929/* cssmodules-pure-no-check */ comments – @jantimon in https://github.com/parcel-bundler/lightningcss/pull/898Update detect-libc for better compatibility by @nicksrandall in https://github.com/parcel-bundler/lightningcss/pull/923
Browsers::load_browserslist by @CPunisher in https://github.com/parcel-bundler/lightningcss/pull/895Nothing published for this version
Implement view transitions level 2, including the @view-transition rule, view-transition-class and view-transition-group properties, and class selecto
@view-transition rule, view-transition-class and view-transition-group properties, and class selector features of the view transition pseudo elements. This enables CSS module scoping and better minification when using these features. – #885@font-feature-values rule – #840light-dark() function – https://github.com/parcel-bundler/lightningcss/commit/304389600fb655c5b1af55f1946518e9b755b860list-style shorthand property – https://github.com/parcel-bundler/lightningcss/commit/97891d85f1ea3a9912a0996daa532e72d0c86046:nth-child(an + b of X) selectors in CSS modules – https://github.com/parcel-bundler/lightningcss/commit/ed9e659ea0d298a836a7cbe1c4f77c69531ee5c8\0 characters in filenames – https://github.com/parcel-bundler/lightningcss/commit/43707c31547b66c3c611cda393ce7fe5d07090d0composeVisitors – #875Fix duplicate prefixed properties in transition-property – #850 (thanks @RobinMalfait and @LeoniePhiline!)
transition-property – #850 (thanks @RobinMalfait and @LeoniePhiline!)all property is set – d4eec3593fe3c2244693d9e11af3547d6651ce57Nothing published for this version
Add an error for the deprecated @value at-rule of CSS Modules by @kdy1 in https://github.com/parcel-bundler/lightningcss/pull/842
@container names in CSS Modules by @kdy1 in https://github.com/parcel-bundler/lightningcss/pull/835input:placeholder by @kdy1 in https://github.com/parcel-bundler/lightningcss/pull/813@value at-rule of CSS Modules by @kdy1 in https://github.com/parcel-bundler/lightningcss/pull/842calc expression – e3c8e12f989651c51d3ae430d888bee7eb058207calc expression – 378955ed60e88b00791b08c32d9e6d39bea7a4c6clamp function reduction when the comparison between preferred and max value is unknown – ddc9ce868d82d893d579643c83a6774fd966f917Add [content-hash] css module pattern by @rubberpants in https://github.com/parcel-bundler/lightningcss/pull/802. This includes a hash of the file con
[content-hash] css module pattern by @rubberpants in https://github.com/parcel-bundler/lightningcss/pull/802. This includes a hash of the file contents rather than the file path (as [hash] works), which can be used to support multiple versions of the same library simultaneously without conflicts.box-shadow combination of oklch and currentColor by @hi-ogawa in https://github.com/parcel-bundler/lightningcss/pull/801Add support for named timeline ranges in @keyframes by @grimsteel in https://github.com/parcel-bundler/lightningcss/pull/787
@keyframes by @grimsteel in https://github.com/parcel-bundler/lightningcss/pull/787:is(input:checked) by @kdy1 in https://github.com/parcel-bundler/lightningcss/pull/783Fixes a property ordering bug when using the all shorthand.
Fixes a property ordering bug when using the all shorthand.
This release adds more granular options for CSS modules, implements some new CSS properties, and fixes bugs.
This release adds more granular options for CSS modules, implements some new CSS properties, and fixes bugs.
grid, animation, and custom_idents. This may be useful when migrating from other tools. See docs. Thanks @timneutkens! 83839a98dbe0000acbdf039d968f33e1e8c50277all shorthand property to reset other properties except direction and unicode-bidi. d7aeff3db67ee9d15e0fefce9251cf41c0b8ec44animation-timeline property and add support for it in the animation shorthand f4408c7bdbbfa2c4cbdf5731b351811a0323fa8ctranslate: none and scale: none which are distinct from translate: 0 and scale: 1. Thanks @RobinMalfait! a4cc0246d28c364c0f4e16552685bd911444bdc5currentColor keyword. Thanks @magic-akari! 06ba62f6d1af563cd8ad31dba13844f434345720color() function to follow spec change 445def9a77f89aa612fecb2f776261fc2c9d8f66animation shorthand fb4b33488cbf54ba063de8babb42aec016a96ce8Disabled CSS transform optimizations using matrix(), which could break transitions and animations. – https://github.com/parcel-bundler/lightningcss/pu
transform optimizations using matrix(), which could break transitions and animations. – https://github.com/parcel-bundler/lightningcss/pull/694@supports declarations with the same property (minus vendor prefix) and value – 6bd2761badb9d5434783acffcae35ef6c3311e06This release adds support the the light-dark() color function, parses CSS system colors, deduplicates custom properties during minification, merges du
This release adds support the the light-dark() color function, parses CSS system colors, deduplicates custom properties during minification, merges duplicates @keyframes rules, and fixes some bugs.
The light-dark() function allows you to specify a light mode and dark mode color in a single declaration, without needing to write a separate media query rule. In addition, it uses the color-scheme property to control which theme to use, which allows you to set it programmatically. The color-scheme property also inherits so themes can be nested and the nearest ancestor color scheme applies.
Lightning CSS converts the light-dark() function to use CSS variable fallback when your browser targets don't support it natively. For this to work, you must set the color-scheme property on an ancestor element. The following example shows how you can support both operating system and programmatic overrides for the color scheme.
html {
color-scheme: light dark;
}
html[data-theme=light] {
color-scheme: light;
}
html[data-theme=dark] {
color-scheme: dark;
}
button {
background: light-dark(#aaa, #444);
}
compiles to:
html {
--lightningcss-light: initial;
--lightningcss-dark: ;
color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
html {
--lightningcss-light: ;
--lightningcss-dark: initial;
}
}
html[data-theme="light"] {
--lightningcss-light: initial;
--lightningcss-dark: ;
color-scheme: light;
}
html[data-theme="dark"] {
--lightningcss-light: ;
--lightningcss-dark: initial;
color-scheme: dark;
}
button {
background: var(--lightningcss-light, #aaa) var(--lightningcss-dark, #444);
}
Check it out in the playground.
CSS system colors are now supported during parsing, meaning they can be safely deduplicated when merging rules.
.a {
background: Highlight;
}
.a {
background: ButtonText;
}
compiles to:
.a{background:buttontext}
CSS custom properties are now deduplicated when merging rules. The last property value always wins.
.a {
--foo: red;
}
.a {
--foo: green;
}
minifies to:
.a{--foo:green}
@keyframes deduplication@keyframes rules are also now deduplicated during minification. The last rule of the same name wins.
@keyframes a {
from { opacity: 0 }
to { opacity: 1 }
}
@keyframes a {
from { color: red }
to { color: blue }
}
compiles to:
@keyframes a{0%{color:red}to{color:#00f}}
This release improves minification for @layer and @property rules, enables relative colors to be compiled in more situations, adds new functionality f
This release improves minification for @layer and @property rules, enables relative colors to be compiled in more situations, adds new functionality for custom visitor plugins, and fixes some bugs.
Lightning CSS can now down level relative colors where the alpha value is unknown (e.g. a variable). For example:
.foo {
color: hsl(from yellow h s l / var(--alpha));
}
becomes:
.foo {
color: hsla(60, 100%, 50%, var(--alpha));
}
@layer rules@layer rules with the same name are now merged together and ordered following their original declared order. For example:
@layer a, b;
@layer b {
.foo { color: red }
}
@layer a {
.foo { background: yellow }
}
@layer b {
.bar { color: red }
}
becomes:
@layer a {
.foo { background: yellow }
}
@layer b {
.foo, .bar { color: red }
}
@property rules@property rules are now deduplicated when they define the same property name. The last rule wins.
@property --property-name {
syntax: '<color>';
inherits: false;
initial-value: yellow;
}
.foo {
color: var(--property-name)
}
@property --property-name {
syntax: '<color>';
inherits: true;
initial-value: blue;
}
compiles to:
@property --property-name{
syntax: "<color>";
inherits: true;
initial-value: #00f
}
.foo {
color: var(--property-name)
}
The JS visitor API now supports StyleSheet and StyleSheetExit visitors, allowing you to visit the entire stylesheet at once. This enables things like rule sorting or appending/prepending rules.
let res = transform({
filename: 'test.css',
minify: true,
code: Buffer.from(`
.foo {
width: 32px;
}
.bar {
width: 80px;
}
`),
visitor: {
StyleSheetExit(stylesheet) {
stylesheet.rules.sort((a, b) => a.value.selectors[0][0].name.localeCompare(b.value.selectors[0][0].name));
return stylesheet;
}
}
});
assert.equal(res.code.toString(), '.bar{width:80px}.foo{width:32px}');
Keep in mind that visiting the entire stylesheet can be expensive, due to needing to serialize and deserialize the entire AST to send between Rust and JavaScript. Keep visitors as granular as you can to avoid this.
grid-auto-flow in custom visitors-webkit-fill-available and -moz-available size valuesinitial-value of @property rulesInit Wasm module only once in browsers – https://github.com/parcel-bundler/lightningcss/pull/615
Updated CSS nesting to the latest spec which allows element selectors to be nested without a preceding & selector. Since it is shipping in all major b
& selector. Since it is shipping in all major browsers, nesting support is now enabled by default (no need to add to the drafts config). 🥳:is and :-webkit-any:not selector list down leveling. Instead of :not(.a, .b) compiling to :not(.a):not(.b), it now compiles to :not(:is(.a, .b)) (down leveled to :-webkit-any if needed). This preserves the specificity rather than raising it for each :not.Support bundle and bundleAsync APIs in wasm builds
Nothing published for this version
Fix custom top-level style blocks when not nested
One column per quarter.