-
Notifications
You must be signed in to change notification settings - Fork 11
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
Minifying bootstrap 4 beta #8
Comments
Hmm. we had a similar issue some time ago and more or less agreed that urls cannot contain spaces. They have to be escaped. |
That is generally a fair assumption; though from the example above it isn't necessarily true in all cases. Regardless of the url() function wrapper, I would have expected the string's contents to not to be minimized. Isn't the biggest issue, but it does make minifying bootstrap using rcssmin a bit unwieldy, as modifying library code potentially makes it harder to upgrade in the future |
Me too agrees that spaces in urls have to be escaped. And so they are in the bootstrap sample. They are enclosed between double quotes. |
@madebr It's not about CSS Syntax, it's about URL quoting: https://tools.ietf.org/html/rfc2397. These data-URLs are plain wrong. |
Browsers appear to support spaces in data URLs (as long as they are quoted strings of course). The original data URLs from Bootstrap 4 renders just fine and is what is used in the compiled version of Bootstrap available on their CDN. rcssmin is taking a URL, which browsers parse just fine, and rendering an invalid data URL, which browsers can't parse at all. csscompressor has the same issue (there is a workaround in the linked issue). I realize this tool exists to strip whitespace but in this case, rather than stripping whitespace, could rcssmin instead leave as-is or alternatively simply replace with |
Yes, WS inside URLs are supposed to be strippable (so you can insert them for readability). Said that, I started working on the issue: https://github.com/ndparker/rcssmin/tree/issue8 |
Hi, Has there been any progress on this issue? |
No :-( |
Fix released with 1.1.0. |
Minifying this particular bootstrap 4 beta css rule produces the following output:
Which is incorrect. For some reason, the string quotes are not being respected and their contents are being minified.
The text was updated successfully, but these errors were encountered: