css - Bootstrap Customization: Why should I use LESS? -


i'm considering integrating less in bootstrap editor (bootply.com) conform bootstrap customization best practices, , support mixins.

however, i've yet determine specific advantages (performance , otherwise) of using less on simple css overrides. seems in end less compiled css. seems less introduce more maintainence/recompiling tasks new versions of bootstrap introduced.

currently bootstrap customization bootply done adding custom 'theme.css' after 'bootstrap.css'. if want change .navbar color add few lines 'theme.css' like..

.navbar-custom .navbar-inner {    background-color:#444444; } 

and markup looks like:

<div class="navbar navbar-custom navbar-fixed-top">.. 

if not best practice customization, how less improve on it?

less abstracts away css messes this:

background: #45484d; /* old browsers */ background: -moz-linear-gradient(top,  #45484d 0%, #000000 100%); /* ff3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#45484d), color-stop(100%,#000000)); /* chrome,safari4+ */ background: -webkit-linear-gradient(top,  #45484d 0%,#000000 100%); /* chrome10+,safari5.1+ */ background: -o-linear-gradient(top,  #45484d 0%,#000000 100%); /* opera 11.10+ */ background: -ms-linear-gradient(top,  #45484d 0%,#000000 100%); /* ie10+ */ background: linear-gradient(to bottom,  #45484d 0%,#000000 100%); /* w3c */ filter: progid:dximagetransform.microsoft.gradient( startcolorstr='#45484d', endcolorstr='#000000',gradienttype=0 ); /* ie6-9 */ 

in case, navbar has gradient, cannot change background color. if use less, can pick 2 colors, , somewhere inside bootstrap's css files, looks above mess updated automatically.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -