You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But because css is minified using less:clean-css, the code in bootstrap.css gets calculated again and comes out in bootstrap.min.css as:
.timeline {
width: 10%;
}
I thought of telling the less:minify task in the gruntfile to use the original bootstrap.less file as the source, but then it loses out on the autoprefixer and csscomb tasks that usually run on the css beforehand.
Not really a Less fault. I looked at Gruntfile.js and the minify task is looking at least strange there. Does not it compile already compiled css as less code for the second time? If so then @robertdodd 's result is expected since the first run (less-compile) compiles e("calc(100% - 90px)"); to calc(100% - 90px); and the second run (less:minify) compiles calc(100% - 90px); to calc(10px); since no --strict-math option set for this task. I guess this particular issue can be overcome by adding strictMath: true to the less:minify task, but yet again, the task itself is very questionable (Less is not really 100% compatible with CSS so such "double compilation" just opens a can of worms).
Activity
cvrebert commentedon May 15, 2014
Sounds like a possible
clean-cssbug.CC: @XhmikosR
XhmikosR commentedon May 15, 2014
I can't reproduce the issue with clean-css 2.1.8:
So it must be
lessthat's causing this.seven-phases-max commentedon May 15, 2014
Not really a Less fault. I looked at Gruntfile.js and the
minifytask is looking at least strange there. Does not it compile already compiled css as less code for the second time? If so then @robertdodd 's result is expected since the first run (less-compile) compilese("calc(100% - 90px)");tocalc(100% - 90px);and the second run (less:minify) compilescalc(100% - 90px);tocalc(10px);since no--strict-mathoption set for this task. I guess this particular issue can be overcome by addingstrictMath: trueto theless:minifytask, but yet again, the task itself is very questionable (Less is not really 100% compatible with CSS so such "double compilation" just opens a can of worms).XhmikosR commentedon May 15, 2014
Not really a clean-css fault, that was my point.
Personally, I don't like Less' approach with its built in clean-css, and I wasn't the one who added that so I don't know if it's done right or not.
seven-phases-max commentedon May 15, 2014
Yes, of course.
I guess the proper solution would be to reassign the minification of those css files from the
lesstask to thecssmintask.XhmikosR commentedon May 15, 2014
@seven-phases-max: feel free to make a PR for that.
XhmikosR commentedon May 19, 2014
Fixed in #13624
robertdodd commentedon May 19, 2014
Awesome, I'm glad to have helped, thanks for merging!