Skip to content

Previous sibling selectors incorrectly parsed without whitespace #69

@rockwotj

Description

@rockwotj

I 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>

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions