Skip to content

Conversation

@mohamedmansour
Copy link

@mohamedmansour mohamedmansour commented Dec 10, 2025

Changes

  • Added angle_bracket_value rule to parse <type_name> syntax
  • Restricted to function arguments only (not general CSS values)
  • Includes test for various attribute angles

Spec Reference

CSS Values and Units Module Level 5 § 8.7 attr() notation

Examples

.foo {
  --x: attr(foo type(<number>), 0);
  width: attr(data-width <length>, 100px);
  color: attr(data-color <color>, blue);
}

Testing

  • All existing tests pass (41/41)
  • Added new test case covering multiple type syntaxes
  • Verified angle brackets properly rejected outside function arguments

Fixes #88

@mohamedmansour
Copy link
Author

@amaanq I added support for the CSS spec for angled brackets, don't know if I was supposed to commit the parse.c and grammar.json

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 this pull request may close these issues.

bug: Parser fails on typed attr() function with angle brackets in type notation

1 participant