Closed wykopx closed 11 months ago
using :not() and :is() both gives an error in the same way Erros is happening when you
When all above conditions are met you will get an error:
Expected "}" but found ")". Unexpected ")". Unexpected "}".
EXAMPLE 1 :not() - this gives an error:
div:not(.test1, .test2), div:not(.test1, .test2) > span { color: red; }
EXAMPLE 2 :is() - this gives an error:
div:is(.test, .test1), // uncomment this line to get an error div:is(.test, .test2) > span { color: red; }
When you change order for test classes and "first class" in the first selector is different than "first class" in second selector this works fine:
div:is(.test1, .test), div:is(.test2, .test) > span, { color: green; }
WORKAROUND It's enough to give some dummy class that we don't even need as the first class and it works:
div:is(.dummy, .test, .test2), div:is(.test, .test2) > span, { color: green; }
I prepared test Userstyle that shows this error:
https://userstyles.world/style/13700/is-selector-causing-an-error
It's an upstream bug in the preprocessor, please see https://github.com/openstyles/stylus/discussions/1710
Bug Report
Bug Description
using :not() and :is() both gives an error in the same way Erros is happening when you
When all above conditions are met you will get an error:
Screenshots
CSS Code
EXAMPLE 1 :not() - this gives an error:
EXAMPLE 2 :is() - this gives an error:
When you change order for test classes and "first class" in the first selector is different than "first class" in second selector this works fine:
WORKAROUND It's enough to give some dummy class that we don't even need as the first class and it works:
System Information
Additional information:
I prepared test Userstyle that shows this error:
https://userstyles.world/style/13700/is-selector-causing-an-error