Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selectors starting with colon can be handled incorrectly #115

Open
kizu opened this issue May 13, 2020 · 0 comments
Open

Selectors starting with colon can be handled incorrectly #115

kizu opened this issue May 13, 2020 · 0 comments

Comments

@kizu
Copy link

kizu commented May 13, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant