Using less in Bootstrap and why it need.

Рубрика: Без категории, Дата: 18 August, 2016, Автор:

Hello guys!

Today we review less in bootstrap, I can’t immediately understand why it need. Read book about bootstap and there was described about harp.js and I think it need use and however will creating CSS. It’s thought wrong.

Know I understood how use less and why it need, a bit understand 🙂 .
Ok go . Less need for compile Less sources files to CSS files. Less it’s special languages which use variables and mixins and others features.

We only compile less file to CSS files , on official bootstap site exist describe how you can make it, there is all a bit section devoted it. I seem better use guideline described there. There using utility grunt from npm packages in install. Before you have to install nodejs with npm repository and use command prompt we install grunt
Install Grunt globally npm install -g grunt-cli and navigate to the /rootbootstap/ directory, and then run npm install npm will looked file pakage.json and install all necessarily local dependents.
And after it above you able use Grunt commands run grunt dist and in folder /dist/ will compile all your source. In this folder you found your CSS files prepared for using.

Exist also less utility, you can use it too, install it you need use npm packages , I forget command, use it like grunt.

npm install -g less

and use this command

lessc ./less/bootstrap.less > bootstrap.css

you created file bootstrap.css with styles, but it not compressed , for compress you need use keyword –compress.

And all bro, if you something don’t understood , use google help you 🙂 . Till next meetings , Bey.


Оставить комментарий

Your email address will not be published. Required fields are marked *