Skip to content

Using @starting-style CSS at-rule crashes the parser with "property missing ':'" error #318

Closed
@jantimon

Description

@jantimon

When using the @starting-style CSS at-rule, which is used to define starting values for properties set on an element, the parser crashes with a property missing ':' error. This issue can be consistently reproduced using the provided sample code.

Expected Behaviour

The parser should correctly process the @starting-style at-rule without errors.

Actual Behaviour

The parser crashes and throws an error stating property missing ':'.

Reproduce Scenario (including but not limited to)

Steps to Reproduce

  1. Use the @starting-style CSS at-rule in a stylesheet.
  2. Attempt to parse the stylesheet with the Adobe CSS Tools parser.

Platform and Version

  • Adobe CSS Tools version: 4.3.3
  • Node.js 18.11.0

Sample Code that illustrates the problem

const cssTools = require("@adobe/css-tools")

cssTools.parse(`
 @starting-style {
   body {
     background: orange
   }
 }
`);

Logs taken while reproducing problem

Here is a reproduction of the issue in a Runkit environment: https://runkit.com/jantimon/6658a0b8c7c7990008b1e447

The error encountered is:

property missing ':'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions