Parse parameterized data types and combined multipliers in CSS value syntax#332
Draft
Parse parameterized data types and combined multipliers in CSS value syntax#332
Conversation
…al multiplier after range Co-authored-by: barak007 <2240471+barak007@users.noreply.github.com>
Co-authored-by: barak007 <2240471+barak007@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement parsing for known problematic values in value parser
Parse parameterized data types and combined multipliers in CSS value syntax
Mar 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Three CSS value syntax patterns were unparseable and skipped in tests:
<boolean-expr[ <if-test> ]>,<number>{2}?, and<custom-arg>+#?.Parser changes (
value-syntax-parser.ts)Parameterized data types: When
[appears inside<>, peek ahead to distinguish numeric ranges ([1, 1000]— first token istext) from type constraints ([ <if-test> ]— first token is<). Constraints are folded into the data type name via depth-tracked bracket matching.?after existing range multiplier: Instead of throwing "multiple multipliers on same node",?now sets the range minimum to 0. This handles{2}?→[0, 2]and+#?→[0, ∞]withlist: true.Test changes (
css-value-syntax.spec.ts)knownProblemticValuespacesCasesskip list — all three cases now run in the spec-driven sanity suite✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.