Skip to content

Pseudo-elements don't work with pseudoclasses #1473

@mellyeliu

Description

@mellyeliu

We enforce top-level pseudo-elements, but given something like so:

const styles = stylex.create({
    foo: {
    "::before": {
      content: '"✓"',
      color: {
        default: 'yellow',
        ':hover': 'red'
      },
   }
})

The outputted CSS is as follows, which is invalid, as pseudo-elements must after at the end of the selector.

.x1qdmp1q::before:hover{color:red}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions