Sourced from css-tree's releases.
3.0.0
- Added support for the
@containerat-rule- Added support for the
@starting-styleat-rule- Added support for the
@scopeat-rule- Added support for the
@position-tryat-rule- Added support for the
@layerat-rule- Added support for
layer,layer()andsupports()in the@mediaat-rule (according tothe @import rulein Cascading and Inheritance 5)- Added
LayerandLayerListnode types- Added
TokenStream#lookupTypeNonSC()method- Added
<dashed-ident>to generic types- Bumped
mdn/datato2.10.0- Aligned
<'font'>to CSS Fonts 4- Aligned
<color>to CSS Color 5- Fixed initialization when
Object.prototypeis extended or polluted (#262)- Fixed
fork()method to consider thegenericoption when creating a Lexer instance (#266)- Fixed crash on parse error when custom
lineoroffsetis specified via options (#251)- Fixed
speaksyntax patch (#241)- Fixed
:lang()to accept a list of<ident>or<string>per spec (#265)- Fixed lexer matching for syntaxes referred to as
<'property'>, when the syntax has a top-level#-multiplier (#102)- Relaxed parsing of syntax definition to allow whitespaces in range multiplier (#270)
- Changed
parseWithFallback()to rollbacktokenIndexbefore calling a fallback- Changed
Blockto not include{and}- Changed
AtruleandRuleto include{and}for a block- Changed
Ratioparsing:
- Left and right parts contain nodes instead of strings
- Both left and right parts of a ratio can now be any number; validation of number range is no longer within the parser's scope.
- Both parts can now be functions. Although not explicitly mentioned in the specification, mathematical functions can replace numbers, addressing potential use cases (#162).
- As per the CSS Values and Units Level 4 specification, the right part of
Ratiocan be omitted. While this can't be a parser output (which would produce aNumbernode), it's feasible duringRationode construction or transformation.- Changes to query-related at-rules:
- Added new node types:
Feature: represents features like(feature)and(feature: value), fundamental for both@mediaand@containerat-rulesFeatureRange: represents features in a range contextFeatureFunction: represents functional features such as@supports'sselector()or@container'sstyle()Condition: used across all query-like at-rules, encapsulating queries with features and thenot,and, andoroperatorsGeneralEnclosure: represents the<general-enclosed>production, which caters to unparsed parentheses or functional expressionsNote: All new nodes include a
kindproperty to define the at-rule type. Supported kinds aremedia,supports, andcontainer- Added support for functions for features and features in a range context, e.g.
(width: calc(100cm / 6))- Added a
conditionvalue for the parser's context option to parse queries. Use thekindoption to specify the condition type, e.g.,parse('...', { context: 'condition', kind: 'media' })- Introduced a
featuressection in the syntax configuration for defining functional features of at-rules. Expand definitions using thefork()method. The current definition is as follows:features: { supports: { selector() { /* ... */ } }, container: { style() { /* ... */ } } }- Changes for
@mediaat-rule:
- Enhanced prelude parsing for complex queries. Parentheses with errors will be parsed as
GeneralEnclosed- Added support for features in a range context, e.g.
(width > 100px)or(100px < height < 400px)- Transitioned from
MediaFeaturenode type to theFeaturenode type withkind: "media"- Changed
MediaQuerynode structure into the following form:
... (truncated)
Sourced from css-tree's changelog.
3.0.0 (September 11, 2024)
- Added support for the
@containerat-rule- Added support for the
@starting-styleat-rule- Added support for the
@scopeat-rule- Added support for the
@position-tryat-rule- Added support for the
@layerat-rule- Added support for
layer,layer()andsupports()in the@mediaat-rule (according tothe @import rulein Cascading and Inheritance 5)- Added
LayerandLayerListnode types- Added
TokenStream#lookupTypeNonSC()method- Added
<dashed-ident>to generic types- Bumped
mdn/datato2.10.0- Aligned
<'font'>to CSS Fonts 4- Aligned
<color>to CSS Color 5- Fixed initialization when
Object.prototypeis extended or polluted (#262)- Fixed
fork()method to consider thegenericoption when creating a Lexer instance (#266)- Fixed crash on parse error when custom
lineoroffsetis specified via options (#251)- Fixed
speaksyntax patch (#241)- Fixed
:lang()to accept a list of<ident>or<string>per spec (#265)- Fixed lexer matching for syntaxes referred to as
<'property'>, when the syntax has a top-level#-multiplier (#102)- Relaxed parsing of syntax definition to allow whitespaces in range multiplier (#270)
- Changed
parseWithFallback()to rollbacktokenIndexbefore calling a fallback- Changed
Blockto not include{and}- Changed
AtruleandRuleto include{and}for a block- Changed
Ratioparsing:
- Left and right parts contain nodes instead of strings
- Both left and right parts of a ratio can now be any number; validation of number range is no longer within the parser's scope.
- Both parts can now be functions. Although not explicitly mentioned in the specification, mathematical functions can replace numbers, addressing potential use cases (#162).
- As per the CSS Values and Units Level 4 specification, the right part of
Ratiocan be omitted. While this can't be a parser output (which would produce aNumbernode), it's feasible duringRationode construction or transformation.- Changes to query-related at-rules:
Added new node types:
Feature: represents features like(feature)and(feature: value), fundamental for both@mediaand@containerat-rulesFeatureRange: represents features in a range contextFeatureFunction: represents functional features such as@supports'sselector()or@container'sstyle()Condition: used across all query-like at-rules, encapsulating queries with features and thenot,and, andoroperatorsGeneralEnclosure: represents the<general-enclosed>production, which caters to unparsed parentheses or functional expressionsNote: All new nodes include a
kindproperty to define the at-rule type. Supported kinds aremedia,supports, andcontainer.Added support for functions for features and features in a range context, e.g.
(width: calc(100cm / 6))Added a
conditionvalue for the parser's context option to parse queries. Use thekindoption to specify the condition type, e.g.,parse('...', { context: 'condition', kind: 'media' }).Introduced a
featuressection in the syntax configuration for defining functional features of at-rules. Expand definitions using thefork()method. The current definition is as follows:features: { supports: { selector() { /* ... */ } }, container: { style() { /* ... */ } } }Changes for
@mediaat-rule:
- Enhanced prelude parsing for complex queries. Parentheses with errors will be parsed as
GeneralEnclosed.- Added support for features in a range context, e.g.
(width > 100px)or(100px < height < 400px)
... (truncated)
9de5189
3.0.0336c67e
Remove wrongly added files56f3788
Fix lint errora9a63cb
Improve support for @position-try
by adding allowed descriptors66b312d
Update the year049dc34
Run unit tests on windows41e70a6
Fix bundling on windowsb8a97dd
Try bundle on windowscf8e828
Align color to css-color-5 (fixes #244)94a5d77
Remove draft entry