-
Notifications
You must be signed in to change notification settings - Fork 144
retain CSSList and Rule comments when rendering CSS #351
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
Conversation
@Ruud68 Thanks for contributing! ❤️ Two things:
|
src/Rule/Rule.php
Outdated
@@ -106,7 +106,6 @@ public static function parse(ParserState $oParserState) | |||
while ($oParserState->comes(';')) { | |||
$oParserState->consume(';'); | |||
} | |||
$oParserState->consumeWhiteSpace(); |
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.
Fix: remove this otherwise 'next' comment will be not set
@oliverklee the fix is actually a very small one, I have added it as a comment to the code in the PR. |
@Ruud68 I'll check what would be a good place for you to start with the tests. |
okay thanks @oliverklee I spent greater part of the day reverse engineering the code for these changes (not documented) and had a quick look at the unit tests. I do not think this will be a quick add for me (the tests) :( |
… between comments except last one
@oliverklee learned a lot :) did some small changes and fixed unittesting.... I hope :) |
Thanks @Ruud68 for the great work! I took the liberty of making rendering comments optional (by way of a |
My pleasure, glad I could contribute. making it optional is definitely a good option :) |
Hi,
was banging my head against the wall as my css comments would vanish when using a autoprefixer repo that utilizes this repo.
Found out that the issue was that comments are only partly implemented in this repo: they are recognized, but when rendering the parsed css code they are not added back.
So I rolled up my sleeves and did this PR.
This PR does two things:
So this is my first PR in this repo, would love to have some feedback / discussion / tests :)
Thanks in advance,
regards, Ruud