Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jantimon opened this issue May 30, 2024 · 1 comment · Fixed by #319
Closed

Comments

@jantimon
Copy link

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 ':'
@jantimon
Copy link
Author

I created a fix in #319

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant