lightningcss
lightningcss copied to clipboard
An extremely fast CSS parser, transformer, bundler, and minifier written in Rust.
- `:is()` takes a *forgiving* selector list (except in Firefox 78–81). This means that `:-moz-any()` and `:-webkit-any()` will behave differently in some cases. For correctness, you need to assess whether...
For this input ```css .pre { :global(.line:before), :global(.highlighted-line:before) { content: counter(line); } } ``` Lightningcss generates ([playground link](https://lightningcss.dev/playground/index.html#%7B%22minify%22%3Afalse%2C%22customMedia%22%3Atrue%2C%22cssModules%22%3Atrue%2C%22analyzeDependencies%22%3Afalse%2C%22targets%22%3A%7B%22chrome%22%3A5963776%7D%2C%22include%22%3A0%2C%22exclude%22%3A0%2C%22source%22%3A%22.pre%20%7B%5Cn%20%20%3Aglobal(.line%3Abefore)%2C%5Cn%20%20%3Aglobal(.highlighted-line%3Abefore)%20%7B%5Cn%20%20%20%20content%3A%20counter(line)%3B%5Cn%20%20%7D%5Cn%7D%5Cn%22%2C%22visitorEnabled%22%3Afalse%2C%22visitor%22%3A%22%7B%5Cn%20%20Color(color)%20%7B%5Cn%20%20%20%20if%20(color.type%20%3D%3D%3D%20'rgb')%20%7B%5Cn%20%20%20%20%20%20color.g%20%3D%200%3B%5Cn%20%20%20%20%20%20return%20color%3B%5Cn%20%20%20%20%7D%5Cn%20%20%7D%5Cn%7D%22%2C%22unusedSymbols%22%3A%5B%5D%2C%22version%22%3A%221.30.1%22%7D)) ```css :is(.EgL3uq_pre .line:before, .EgL3uq_pre .highlighted-line:before) { content: counter(line); } ``` [which is...
`options` will be discarded during the serialization of `stylesheet`, and `options` will use the default value after deserialization This change of `pr` will also include `option` in the serialization, so...
Fixes https://github.com/parcel-bundler/lightningcss/issues/1005, https://github.com/parcel-bundler/lightningcss/issues/1001, and https://github.com/parcel-bundler/lightningcss/issues/976 The `has_whitespace` in `TokenList` did not account for minified code that could have adjacent tokens and values that _require_ whitespace between them. This PR attempts...