.col-sm-6 is dynamic generation at compile time, therefore cannot be extended .
.search { .make-sm-column(6); }
generates:
.search { position: relative; min-height: 1px; padding-left: 15px; padding-right: 15px; } @media (min-width: 768px) { .search { float: left; width: 50%; } }
This is a bit overhead, but small in relation to another source.
In theory, you can compile twice:
lessc bootstrap.less > bootstrap.csslessc test.less > test.css, with test.less:
@import (less) "bootstrap.css"; .search { &:extend(.col-sm-6); }
To do diff on bootstrap.css and test.css I found, as expected, among others:
> .col-sm-6, > .search { 1010c1082,1093 < .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 { ---
re-compilation is as follows:
- put.col-md- * etc. on a new line
- change, for example, from 0.75 to 0.75
- change
(enabled = false) to (enabled=false)
which all do not make sense at first sight
Bass jobsen
source share