Skip to content

Releases: css/csso

3.0.1

14 Mar 12:37
Compare
Choose a tag to compare
  • Fixed declaration merging when declaration contains an !important

3.0.0 – New AST backend and extracting CLI into standalone package

13 Mar 22:34
Compare
Choose a tag to compare

New AST backend

Initially, CSSO used Gonzales for CSS parsing into AST, tree traversal and translating it back to a string. During last year numerous refactorings transformed it into something different. Eventually, AST backend became a brand new solution, too powerful to use it just for a single task like a CSS minification. Therefore it was extracted into a standalone project called CSSTree and developing as an independent.

CSSTree became stable enough. So it's a time bring it back to CSSO as dependency and get fast and efficient CSS parsing and other AST operations. At the same time, CSSTree is more specs compliant and works better for edge cases. Starting this release CSSO is based on CSSTree and gets great tools it provides.

Changes don't affect high-end users but those who're using internal API to deal with AST. The most significant change – every AST method is now behind syntax property of CSSO public API. Actually, the entire CSSTree syntax is behind syntax property. Worth noting that CSSTree that still in active development and syntax API shape may be changed in next CSSO releases while migration on new CSSTree versions. AST format was changed too, but it quite stable now so no surprises expected here.

CLI as standalone package

Command line interface was integrated into CSSO from its beginning. It was common for tools in time when CSSO were invented. Since than frontend developing has been changed, task runners and bundlers rule the world today. Most users use CSSO plugins for task runners and bundlers rather than CLI. That's why extracting it into a separate package (csso-cli) looks reasonable to reduce dependency count. With this release, CLI should be installed separately.

Changes

  • Migrated to CSSTree as AST backend and exposed its API behind syntax property
  • Extracted CLI into standalone package css/csso-cli

2.3.2

10 Mar 21:45
Compare
Choose a tag to compare
  • Fixed infinite loop on value parse (#328)

2.3.1

06 Jan 10:56
Compare
Choose a tag to compare
  • Added \0 IE hack support (#320)

2.3.0

25 Oct 11:15
Compare
Choose a tag to compare
  • Added beforeCompress and afterCompress options support (#316)
  • Fixed crash on empty argument in function (#317)

2.2.1

24 Jul 22:18
Compare
Choose a tag to compare
  • Fixed shorthand optimisation issue when value has a color value or something unknown (#311)
  • Fixed cursor broken fallback (#306)

2.2.0 AST cloning, improve partial merge and bug fixes

23 Jun 09:38
Compare
Choose a tag to compare
  • Implement AST cloning by adding clone() function and clone option for compress() function (#296)
  • Fix parse and translate attribute selector with flags but with no operator (i.e. [attrName i])
  • Don't merge rules with flagged attribute selectors with others (#291)
  • Take in account functions when merge TRBL-properties (#297, thanks to @ArturAralin)
  • Improve partial merge (#304)
  • Tweak scanner, reduce code deoptimizations and other small improvements

1.8.2

23 Jun 00:11
Compare
Choose a tag to compare
  • Fix wrong declaration with \9 hack merge (#295)
  • Take in account functions when merge TRBL-properties (#297)
  • Improve partial merge (#304)

2.1.1

11 May 13:57
Compare
Choose a tag to compare
  • Fix wrong declaration with \9 hack merge (#295)

2.1.0

08 May 19:58
Compare
Choose a tag to compare
  • New option comments to specify what comments to left: exclamation, first-exclamation and none
  • Add offset to CSS parse error details
  • Fix token offset computation