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

:is not work with & #2710

Open
usrtax opened this issue Aug 7, 2022 · 2 comments
Open

:is not work with & #2710

usrtax opened this issue Aug 7, 2022 · 2 comments
Assignees
Labels

Comments

@usrtax
Copy link

usrtax commented Aug 7, 2022

To reproduce:

input:is([type=text], [type=password])
  & + label
   color #f00

Current behavior:

input:is([type=text] + label,[type=password]) + label {
  color: #f00;
}

Expected behavior:

input:is([type=text] ,[type=password]) + label {
  color: #f00;
}
  • stylus version:v0.58.1
@iChenLei
Copy link
Member

iChenLei commented Aug 28, 2022

input:is([type=text], [type=password])
  & + label
   color #f00

It looks like stylus parse input:is([type=text], [type=password]) as two selectors input:is([type=text] and [type=password]), and then apply & parent selector. so we get:

input:is([type=text] + label,[type=password]) + label {
  color: #f00;
}

@iChenLei iChenLei self-assigned this Aug 28, 2022
@cyfung1031
Copy link

cyfung1031 commented Jan 11, 2023

Facing the same issue... #2750

You can use my buildL4 to make the correct L4 selector before the bug is fixed.
#2750 (comment)

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

No branches or pull requests

3 participants