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
Some CSS selectors broken during CSS compression #2517
Comments
A PR with test cases and a fix would be welcome. |
I would say this is an extreme edge case. That kind of syntax is very uncommon and extremely brittle to begin with. I would personally never use it, although it is valid. One better way of writing that CSS (although still really dodgy and not recommended) would be
But best give that element a class or find other ways to select it. |
I think it should be good to ignore quotation marks only. If this is happening, CSS like BTW, a resource for guys working on this: https://stackoverflow.com/questions/17123809/parsing-css-files-using-regex (Just don't have time recently to work on this) |
Is this something that could be upstreamed, it isn't? |
@Klap-in you mean moving the compressor out of DokuWiki into its own library? I'd like that. I'd also be open for using a different compressor if we find something matching our requirements. |
Hmm, I assumed that the lesserphp library performs the compression as well. To obtain some understanding, what are the requirements?
In first random search I spotted: https://github.com/matthiasmullie/minify. By who @phy25 is already inspired for the current solution. |
I wonder "short comment for browser hacks" is still useful in this Chrome age. Also tests are important, too. Maybe we can open another issue for the compressor library selection, since I will soon open the PR for a (temporary) fix. |
The following CSS rule
[style="width: 60%;"]{background-color:red;}
added inconf/userstyle.css
is transformed into[style="width:60%;"]{background-color:red;}
(without the space in the CSS selector) in the webpage'scss.php
file.A temporary way to get around that is to uncheck the 'compress' option in the configuration options.
I'm on 2018-04-22a "Greebo".
The text was updated successfully, but these errors were encountered: