chore(deps): update dependency lightningcss to v1.23.0 #766
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.20.0
->1.23.0
Release Notes
parcel-bundler/lightningcss (lightningcss)
v1.23.0
Compare Source
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.Downlevel relative colors with unknown alpha
Lightning CSS can now down level relative colors where the alpha value is unknown (e.g. a variable). For example:
becomes:
Optimized
@layer
rules@layer
rules with the same name are now merged together and ordered following their original declared order. For example:becomes:
Deduped
@property
rules@property
rules are now deduplicated when they define the same property name. The last rule wins.compiles to:
StyleSheet visitor function
The JS visitor API now supports
StyleSheet
andStyleSheetExit
visitors, allowing you to visit the entire stylesheet at once. This enables things like rule sorting or appending/prepending rules.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.
Other bug fixes
grid-auto-flow
in custom visitors-webkit-fill-available
and-moz-available
size valuesinitial-value
of@property
rulesv1.22.1
Compare Source
e255210
b4bbe47
v1.22.0
Compare Source
Added
&
selector. Since it is shipping in all major browsers, nesting support is now enabled by default (no need to add to thedrafts
config). 🥳Fixed
: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
.v1.21.8
Compare Source
v1.21.7
Compare Source
v1.21.6
Compare Source
Fixes
v1.21.5
Compare Source
Fixed node segmentation fault when throwing an error in a custom visitor using the
bundleAsync
API - parcel-bundler/lightningcss@50dad7fv1.21.4
Compare Source
v1.21.3
Compare Source
v1.21.2
Compare Source
Fixes
91ec8d3
analyzeDependencies
option from bundler APIs in TypeScript definitions –ae97aa1
a8d909a
v1.21.1
Compare Source
Fixes
e66d99c
::marker
pseudo element –cff779d
::part
pseudo element –fbf0d24
:is()
when we can safely unwrap it –8d94ea1
d6e1295
acde78b
5cec8be
currentColor
incolor-mix()
or relative color syntax –20c9612
lightningcss-derive
in Rust crate –1203368
v1.21.0
Compare Source
This release includes new features to improve compatibility of output CSS with your browser targets, and safely remove old fallbacks that aren't needed anymore. It also gives you more control over exactly how CSS is compiled, and fixes some bugs.
Preserve manual fallbacks
Lightning CSS will now preserve manually provided fallback values when some of your browser targets do not support the last one. For example, in the following rule, if some targets didn't support the
max
function, both declarations would be preserved. Otherwise, if we are sure that all targets support it, Lightning CSS will drop the fallback declaration.This is supported for many types of values such as lengths, colors, gradients, images, font styles, etc. It uses compatibility data from caniuse and MDN to determine if each value is supported.
Include and exclude options
You can now control exactly how Lightning CSS compiles using the "include" and "exclude" options, in addition to the existing "targets". This allows you to explicitly turn on or off certain features, which overrides the defaults based on the provided browser targets. For example, you might want to only compile colors, and handle auto prefixing or other features with another tool. Or you may want to handle everything except vendor prefixing with Lightning CSS. These options make that possible.
An enum of available feature flags is provided, and you can use the bitwise OR operator to combine flags together, e.g.
Features.Nesting | Features.Colors
. There are also some flags which turn on multiple other flags at once, e.g.Selectors
,Colors
, andMediaQueries
. The playground has been updated to show these flags and includes checkboxes to turn them on or off.The Rust API has been updated to accept a new
Targets
struct instead ofBrowsers
. This includes browser targets as a sub-field, along with the include and exclude options. See docs.rs for more details.Split selector lists when unsupported
Lightning CSS will now automatically split selector lists when your browser targets don't support some selectors. This avoids a case where browsers ignore the whole rule if only some selectors are unsupported. It takes advantage of :is() forgiving selector lists where possible, otherwise generates multiple rules. For example:
will be compiled to the following if
:focus-visible
is not supported by one of your targets:If
:is()
is unsupported, or if the selectors have different specificities, Lightning CSS will output the following instead:Non-standard selector compatibility
Some frameworks like Angular and View support some non-standard selectors, such as the
::v-deep
pseudo element,>>>
and/deep/
combinators, and:deep(<selector-list>)
syntax. These are now able to be parsed and preserved as is by Lightning CSS. Unknown pseudo elements now allow arbitrary selectors after them unlike normal standard pseudo elements. Unknown functional pseudo selectors will preserve their arguments unmodified. Non-standard combinators can be enabled by adding the following option when compiling:More
Configuration
📅 Schedule: Branch creation - "before 5pm on the first day of the month" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.