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:
^2.3.1
->^3.1.0
Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
csstree/csstree (css-tree)
v3.1.0
Compare Source
<boolean-expr[ test ]>
(#304)source
,startOffset
,startLine
, andstartColumn
parameters toOffsetToLocation
constructor, eliminating the need to callsetSource()
after creating a newOffsetToLocation
instanceOffsetToLocation
class in the main entry point, which was previously accessible only viacss-tree/tokenizer
Raw
node value consumption by ignoring stop tokens inside blocks, resolving an issue whereRaw
value 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 Module Level 5.TokenStream#balance
computation to handle unmatched brackets correctly. Previously, when encountering a closing bracket, theTokenStream
would 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.Layer
node (#310)mdn/data
to 2.12.2v3.0.1
Compare Source
mdn/data
to 2.12.1errors
array to theLexer#validate()
method result, providing details on problematic syntax.Lexer#cssWideKeywords
dictionary to list CSS-wide keywordsconfig.cssWideKeywords
for overriding the default listcssWideKeywords
dictionaryfork()
method to accept acssWideKeywords
option, allowing the addition of new keywords to the existing listBlock
to include{
and}
, andAtrule
andRule
to exclude{
and}
for ablock
(#296)assign
) for the callback in thefork()
method (e.g.,syntax.fork((config, assign) => { ... })
), as it simply refers toObject.assign()
<basic-shapes>
,<absolute-color-function>
and<'stroke-opacity'>
v3.0.0
Compare Source
@container
at-rule@starting-style
at-rule@scope
at-rule@position-try
at-rule@layer
at-rulelayer
,layer()
andsupports()
in the@media
at-rule (according to the @import rule in Cascading and Inheritance 5)Layer
andLayerList
node typesTokenStream#lookupTypeNonSC()
method<dashed-ident>
to generic typesmdn/data
to2.10.0
<'font'>
to CSS Fonts 4<color>
to CSS Color 5Object.prototype
is extended or polluted (#262)fork()
method to consider thegeneric
option when creating a Lexer instance (#266)line
oroffset
is specified via options (#251)speak
syntax patch (#241):lang()
to accept a list of<ident>
or<string>
per spec (#265)<'property'>
, when the syntax has a top-level#
-multiplier (#102)parseWithFallback()
to rollbacktokenIndex
before calling a fallbackBlock
to not include{
and}
Atrule
andRule
to include{
and}
for a blockRatio
parsing:Ratio
can be omitted. While this can't be a parser output (which would produce aNumber
node), it's feasible duringRatio
node construction or transformation.Added new node types:
Feature
: represents features like(feature)
and(feature: value)
, fundamental for both@media
and@container
at-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
, andor
operatorsGeneralEnclosure
: represents the<general-enclosed>
production, which caters to unparsed parentheses or functional expressionsAdded support for functions for features and features in a range context, e.g.
(width: calc(100cm / 6))
Added a
condition
value for the parser's context option to parse queries. Use thekind
option to specify the condition type, e.g.,parse('...', { context: 'condition', kind: 'media' })
.Introduced a
features
section in the syntax configuration for defining functional features of at-rules. Expand definitions using thefork()
method. The current definition is as follows:Changes for
@media
at-rule:GeneralEnclosed
.(width > 100px)
or(100px < height < 400px)
MediaFeature
node type to theFeature
node type withkind: "media"
.MediaQuery
node structure into the following form:Changes for
@supports
at-rule:GeneralEnclosed
.(width > 100px)
or(100px < height < 400px)
SupportsDeclaration
node type to encapsulate a declaration in a query, replacingParentheses
.Condition
orSupportsDeclaration
nodes of kindsupports
instead ofParentheses
.selector()
feature via theFeatureFunction
node (configured infeatures.supports.selector
).Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), 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 was generated by Mend Renovate. View the repository job log.