Closed stevemao closed 9 years ago
Hmm yeah this is a tricky one, strictly speaking this would be outside the scope of the project. Strictly in the sense that CSS is not HTML. Currently, all values of attributes are left intact. But I do feel like that removing additional white spaces (keep one white space basically) and newlines from attributes wouldn't hurt. So I guess I can do something there, I'll release that as part of 1.0.0
Sounds good. Yeah keeping one white space should work for attribute values in general
class="
big
title
"
can become
class="big title"
In order to further optimise inline css I should use another tool.
This is actually the reason I am going to switch away from this minifier. Any hope of optionally allowing line breaks in attributes? For instance the value of an input.
As far as I'm aware this was fixed, if you have a example where it does not work please let me know. I'll make sure to fix that as well
The behavior before this bug was fixed is what I desire.
Likely the way to allow for this is to implement ignoring areas between a specified comment.
Nvm my stupid previous comment, fixed and released with 1.5.0
, simply pass whitespace: true
to retain all whitespace/newlines in attributes
Whitespace in attributes, nice!
Forgive my ignorance of the release schedule, but when you say "fixed and released", does that mean it will release in the future at some point? As I don't see any commits.
Any eta on 1.5?
1.5 should be out, not sure about the integration with the gulp plugin, but that is outside my control.
npm info minimize
output
'1.3.3': '2015-04-03T07:17:53.369Z',
'1.4.0': '2015-04-25T23:30:40.919Z',
'1.4.1': '2015-04-29T07:26:47.843Z',
'1.5.0': '2015-07-01T07:37:17.260Z' },
I don't see any commits on this GitHub or any releases, which is why I'm asking.
https://github.com/Swaagie/minimize/commits/master https://github.com/Swaagie/minimize/releases
Gulp is indeed something else and I plan to ask them as soon as I confirm that 1.5 is released. But if you say it is I'll open an issue there for them to use your latest.
O haha, my bad, I totally forgot to push and tag :( thanks for notifying.
edit: will do now!
i have some inline style in my div
But after minimize using
gulp-minify-html
the white spaces is still there (it could just make all the attribute values oneline).