-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
CSS: Preserve white space before pseudo-class and pseudo-element selectors #985
CSS: Preserve white space before pseudo-class and pseudo-element selectors #985
Conversation
…preserved, since "a :b" is not the same as "a:b"
I have changed the |
Ah, you need to update the python implementation as well. It is really easy. |
…selectors is preserved" in the Python code
@@ -409,6 +409,10 @@ def beautify(self): | |||
else: | |||
# sass/less parent reference don't use a space | |||
# sass nested pseudo-class don't use a space | |||
|
|||
# preserve space before pseudoclasses/pseudoelements, as it means "in any child" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alignment.
Alignment of the comment in the python code. Then I can merge! |
@bitwiseman Ok, done. Python is really tricky with that tabs vs spaces thing. Thank you! |
This issue was raised in a question in Meta Stack Overflow - Stack Overflow uses js-beautify in the code snippets editor.
As explained in the question, the CSS beautifier is converting
tr :first-child {...}
intotr:first-child {...}
, which is incorrect since both things don't mean the same. This change fixes this.