Skip to content

Fix(CSS): {prop:val|val} group declarations render literal pipe - #417

Merged
1aron merged 1 commit into
master-co:rcfrom
0Miles:fix/363-property-fallback
May 3, 2026
Merged

1aron merged 1 commit into
master-co:rcfrom
0Miles:fix/363-property-fallback

Conversation

@0Miles

@0Miles 0Miles commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Closes #363.

Summary

`{paint-order:stroke|fill}` produced `paint-order: stroke|fill` (literal pipe) which browsers reject. Master CSS uses `|` as a class-name-safe space separator (because actual spaces would break HTML class attribute parsing) but the `{ ... }` group declarer was preserving the literal pipe in the value.

Changes

  • `packages/core/src/declarers/core.group.ts:addProp` — replaces `|` with space when extracting the property value
  • New `tests/issue-363-fallback.test.ts` — 4 cases covering single value, 2-value list, 3-value list, and `bg:white|red` regression (regular non-group rule still works)

Testing

  • 4/4 new tests pass; 109 core test files still pass
  • Real Chrome verification via `agent-browser`: pre-fix `paint-order:stroke|fill` → computed `paint-order: "normal"` (declaration rejected); post-fix `paint-order:stroke fill` → computed `"stroke"` (browser accepts and normalizes)

@vercel

vercel Bot commented Apr 30, 2026

Copy link
Copy Markdown

@0Miles is attempting to deploy a commit to the Aoyue Team on Vercel.

A member of the Team first needs to authorize it.

@0Miles 0Miles changed the title fix(core): expand | to space in {prop:val|val} group declarations, resolve #363 Fix(CSS): {prop:val|val} group declarations render literal pipe Apr 30, 2026
{paint-order:stroke|fill} produced paint-order: stroke|fill (literal
pipe) which browsers reject. Master CSS uses | as a class-name-safe
space separator (because actual spaces would break HTML class
attribute parsing) but the { ... } group declarer was preserving the
literal pipe in the value.

- declarers/core.group.ts:addProp replaces | with space when
  extracting the property value
- 4 regression tests covering single value, 2-value list, 3-value
  list, and bg:white|red regression (regular non-group rule still
  works)
- Real Chrome verification: pre-fix paint-order rejected (computed
  "normal"); post-fix accepted (computed "stroke")

Closes master-co#363
@0Miles
0Miles force-pushed the fix/363-property-fallback branch from e521fb8 to dd7bf65 Compare April 30, 2026 19:02
@1aron
1aron merged commit 0173619 into master-co:rc May 3, 2026
11 of 13 checks passed
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.

🐞 Property fallback with | is invalid

2 participants