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

Incorrect composition of rules when using * selector #125

Open
FatConan opened this issue Jul 15, 2023 · 0 comments
Open

Incorrect composition of rules when using * selector #125

FatConan opened this issue Jul 15, 2023 · 0 comments

Comments

@FatConan
Copy link

Hi,
I believe I've found that the rules being generated when using the * selector can introduce white space that alters the meaning of the rule.

Below you can see the outputs of running a quick test from the shell (running version 0.15.1 of lesscpy). You can see that specifying div:last-child lesscpy correctly generates the rule as div.test>div:last-child, however, using *:last-child introduces white space that alters the meaning of the rule, outputting div.test>* :last-child.

>>> import lesscpy
>>> from six import StringIO
>>>
>>> print(lesscpy.compile(StringIO(u"div.test > *:last-child { border-width: 2px * 3; }"), minify=True)) 
div.test>* :last-child{border-width:6px;}
>>> print(lesscpy.compile(StringIO(u"div.test > div:last-child { border-width: 2px * 3; }"), minify=True)) 
div.test>div:last-child{border-width:6px;}
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