I'm working on a Rails application with Bootstrap, and I'm using semantic class names in my HTML. This means I'm using extend
a lot. However, LESS generates some incorrect CSS. I'm not sure if it's a bug or if I'm doing something wrong.
Here's some LESS code to reproduce the issue:
@import "bootstrap";
body#home input {
&:extend(.form-control all);
}
My input
is styled correctly, but the additional following CSS is generated:
textarea.form-control,
textareabody#home input {
height: auto;
}
.form-inline body#home input {
display: inline-block;
width: auto;
vertical-align: middle;
}
I understand that this happens because extend
is just syntactic sugar for search and replace, but isn't there any workaround for the issue?