Answer the question
In order to leave comments, you need to log in
Why are bootstrap's less mixins not working correctly?
Good day to all!
Good people from the toaster told me how to use bootstrap when developing a responsive site, without adding a bunch of classes to html( Is it possible to develop a site responsively without using a lot of classes? ) (thanks to them :) ). This is possible with preprocessors using mixins. But when I started testing this method, I ran into a problem that I can not solve for several hours.
Actually the essence of the problem:
There is a bootstrap.less file
There is my main.less file (in which it is imported @import (reference)"less/bootstrap.less";
)
When adding a class to html, for example "col-xs-2", the columns are displayed normally
But when adding an impurity to main.less, it is displayed like this
Code example
@import (reference)"less/bootstrap.less";
.container{
background: #ccc;
.article-row{
.row;
.article{
.col-xs-2;
// причём если сюда добавить ещё .col-md-2; то при компиляции вылазит ошибка
background: blue;
border: 1px solid #222;
height: 200px;
}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question