github parcel-bundler/lightningcss v1.2.0

latest releases: v1.28.0, v1.27.0, v2.26.0...
2 years ago

Improved performance

This release improves performance by avoiding string copies during parsing, and instead borrowing all strings stored in the AST from the input source code (i.e. just pointers). This also reduces memory usage. New benchmark results:

image

Improved minification

This release also improves minification of custom properties, and properties containing CSS variable references. Parcel CSS can now remove unnecessary whitespace and comments in these properties, and minify color values and numbers embedded within them. For example:

.foo {
  color: var(--color, rgb(255, 255, 0));
}

now minifies to:

.foo{color:var(--color,#ff0)}

Minification of border related properties is also improved by better use of shorthands. For example, the following css:

.foo {
  border-top: 1px solid black;
  border-bottom: 1px solid black;
  border-left: 2px solid black;
  border-right: 2px solid black;
}

now compiles to:

.foo {
  border: 1px solid #000;
  border-width: 1px 2px;
}

Other fixes

  • Fix compilation of CSS nesting selectors with combinators in parent rule - 1e79fa7
  • Fix list-style-type property in CSS modules when none value is used - 9d38efb
  • Fix dependency collection in image-set - 8378ae2
  • Fix vendor prefixing image-set - 0d01b83
  • Update prefix and compat data - 7060ca1
  • Fix transition vendor prefix decomposition - 718efba
  • Improve border shorthand minification - 46cca00
  • Fix compat logic with multiple targets - f1bb3cf
  • More progress on CLI, including sourcemap, nesting, and css-modules CLI flags - d13f86a

Don't miss a new lightningcss release

NewReleases is sending notifications on new releases.