Skip to content

Selectors starting with colon can be handled incorrectly #115

@kizu

Description

@kizu

Sandbox: https://codesandbox.io/s/reshadow-cra-g02zb?file=/src/index.js:820-835

There are two examples: with :global and :not

  :global(.foo) {
    background: red;

    section & {
      background: lime;
    }
  }

  Button {
    border-width: 100px;

    :not(whatever) & {
      border-width: 5px;
    }
  }

Both these cases doesn't work correctly, but if we'd add starsm then they work:

  *:global(.foo) {
    background: red;

    section & {
      background: lime;
    }
  }

  Button {
    border-width: 100px;

    *:not(whatever) & {
      border-width: 5px;
    }
  }

This could probably be reproduced with other selectors as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions