!important can have whitespace after the exclamation point #29

Closed
opened 2026-03-20 16:18:10 +01:00 by SirPepe · 2 comments
SirPepe commented 2026-03-20 16:18:10 +01:00 (Migrated from github.com)

TIL! Input:

div { color: red ! important; }

Result:

StyleSheet(RuleSet(TagSelector(TagName),Block("{",Declaration(PropertyName,":",ValueName,⚠,ValueName),";","}")))

Sorry 😅

[TIL!](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/important) Input: ```css div { color: red ! important; } ``` Result: ``` StyleSheet(RuleSet(TagSelector(TagName),Block("{",Declaration(PropertyName,":",ValueName,⚠,ValueName),";","}"))) ``` Sorry 😅
SirPepe commented 2026-03-20 16:43:55 +01:00 (Migrated from github.com)
Comments are also allowed: https://codepen.io/editor/SirPepe/pen/019d0bcf-233e-7c5e-a6fc-614ece966511
marijnh commented 2026-03-21 14:45:23 +01:00 (Migrated from github.com)

Attached patch should help. I've also pushed patches for the other issues and released a 1.3.2

Attached patch should help. I've also pushed patches for the other issues and released a 1.3.2
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lezer/css#29
No description provided.