Skip to content

parser: Don't ignore a closing curly bracket from within the declaration parser. - #458

Merged
emilio merged 1 commit into
mainfrom
lone-closing-brace
Oct 7, 2026
Merged

emilio merged 1 commit into
mainfrom
lone-closing-brace

Conversation

@emilio

@emilio emilio commented Oct 7, 2026

Copy link
Copy Markdown
Member

Addresses https://bugzilla.mozilla.org/show_bug.cgi?id=2065482.

This gets the behavior that matches other browsers and is a one-liner.

If you're in a block, } is the delimiter anyway (so the iterator can't see it). Otherwise, if you're not parsing qualified rules, you go to the skip-until-semicolon path.

The spec is a bit broken here, see
w3c/csswg-drafts#14565.

Tests and review in https://phabricator.services.mozilla.com/D331713

…ion parser.

Addresses https://bugzilla.mozilla.org/show_bug.cgi?id=2065482.

This gets the behavior that matches other browsers and is a one-liner.

If you're in a block, `}` is the delimiter anyway (so the iterator can't
see it). Otherwise, if you're not parsing qualified rules, you go to the
skip-until-semicolon path.

The spec is a bit broken here, see
w3c/csswg-drafts#14565.

Tests and review in https://phabricator.services.mozilla.com/D331713
@emilio
emilio marked this pull request as ready for review October 7, 2026 19:07
@emilio
emilio merged commit 3a1d1c7 into main Oct 7, 2026
14 checks passed
@emilio
emilio deleted the lone-closing-brace branch October 7, 2026 19:16
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.

1 participant