Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mixing col bootstrap classes in less?

If i do something like this in bootstrap, in html, all is working fine.

<div class="col-lg-9 col-md-9 col-sm-9 col-xs-9 content"> </div>

But problem goes when i want to nest bootstrap col class? How to mix col bootstrap classes in LESS or SASS, always i got undifined, must col be outside

.content
{
.make-lg-column(9);
.make-md-column(9);
.make-sm-column(9);
.make-xs-column(9);
}
like image 540
Schneider Avatar asked Dec 25 '22 15:12

Schneider


1 Answers

You should import the bootstrap.less file. For this download the full bootstrap project, and copy out the less folder. Then put the less folder in your project. Also make sure to add the less.js file to your project if you want to get your less compiled while your working. Look at lesscss.org for more information.

Example : custom.less

@import "../less/bootstrap.less";

 section {
    .make-row();
}
.left-navigation {
    .make-sm-column(3);
}
.main-content {
    .make-sm-column(9);
}

May be this will work for you.

like image 90
Rubyist Avatar answered Dec 28 '22 07:12

Rubyist