Previous sibling selectors incorrectly parsed without whitespace
See original GitHub issueI have browser compliant mode turned on and the following CSS is incorrectly parsed:
div+p .foo{width:100vw}
But the following works fine
div + p .foo{width:100vw}
But it seems like when you ask for optimized output for div + p .foo{width: 100vw}
you get div+p .foo{width:100vw}
which means those rules don’t roundtrip properly? It seems to handle ~
and >
correctly however?
The error message says:
Was expecting one of:
"*"
"."
":"
":not("
"@bottom-center"
"@bottom-left"
"@bottom-left-corner"
"@bottom-right"
"@bottom-right-corner"
"@charset"
"@footnote"
"@import"
"@left-bottom"
"@left-middle"
"@left-top"
"@media"
"@namespace"
"@page"
"@right-bottom"
"@right-middle"
"@right-top"
"@supports"
"@top-center"
"@top-left"
"@top-left-corner"
"@top-right"
"@top-right-corner"
"["
"|"
"}"
<AT_UNKNOWN>
<FONTFACE_SYM>
<HASH>
<IDENT>
<KEYFRAMES_SYM>
<PERCENTAGE>
<S>
<VIEWPORT_SYM>
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (11 by maintainers)
Top Results From Across the Web
How whitespace is handled by HTML, CSS, and in the DOM
Most whitespace characters are ignored, not all of them are. In the earlier example one of the spaces between "Hello" and "World!
Read more >There is no parent and before sibling css selector so what I'm ...
I want to change css of div when a is hovered . Div have to be before a and there is no selector...
Read more >Selectors Level 4 - W3C
Note: As whitespace represents the descendant combinator, no whitespace is allowed between the simple selectors in a compound selector.
Read more >Fighting the Space Between Inline Block Elements | CSS-Tricks
A series of inline-block elements with "normal" HTML formatting result in spaces between them when set on the same line.
Read more >Safari Technology Preview Release Notes - Apple Developer
commitStyles() not changing the style attribute for individual CSS transform ... Changed to not detach whitespace nodes when the previous sibling is an ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for the swift response - levaing this one open for now
Not anytime soon unfortunately 😔