css-tree
3.2.1 · 5 Mar 2026MIT183.3M / weekRepositoryHomepagenpmAtom feed
3.2.1 is the newest release of 3.x.
In short
2 new4 fixed2 changed
Release note
Added support for boolean expression multiplier in syntax definition, i.e.
<boolean-expr[ test ]>Added
source,startOffset,startLine, andstartColumnparameters toOffsetToLocationconstructor, eliminating the need to callsetSource()after creating a newOffsetToLocationinstanceExposed
OffsetToLocationclass in the main entry point, which was previously accessible only viacss-tree/tokenizerFixed
Rawnode value consumption by ignoring stop tokens inside blocks, resolving an issue whereRawvalue consumption stopped prematurely. This fix also enables parsing of functions whose content includes stop characters (e.g., semicolons and curly braces) within declaration values, aligning with the latest draft of CSS Values and Units L5.Fixed
TokenStream#balancecomputation to handle unmatched brackets correctly. Previously, when encountering a closing bracket, theTokenStreamwould prioritize it over unmatched opening brackets, leading to improper parsing. For example, the parser would incorrectly consume the declaration value of.a { prop: ([{); }as([{)instead of consuming it until all opened brackets were closed (([{); }). Now, unmatched closing brackets are discarded unless they match the most recent opening bracket on the stack. This change aligns CSSTree with CSS specifications and browser behavior.Fixed syntax definition parser to allow a token to be followed by a multiplier
Fixed location for
LayernodeBumped
mdn/datato 2.12.2
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.