I'm using Bootstrap 3.1.1 and adding my own LESS styles with semantic names.
Using grunt-customize-bootstrap
I've added mystyles.less
at the end of bootstrap.less
, just before the inclusion of responsive-utilities.less
(I don't know why, that's grunt-customize-bootstrap
's default behavior, but even in the last position the issue remains).
I defined my own dropdown menu like this:
.my-dropdown {
.dropdown;
> .my-toggle {
.dropdown-toggle;
}
}
This is how it is defined in bootstrap's panels.less
:
> .dropdown .dropdown-toggle {
color: inherit;
}
But grunt is not really happy about it:
Running "less:compile" (less) task
>> NameError: .dropdown-toggle is undefined in less/mystyles.less on line 51, column 15:
>> 50 > .my-toggle {
>> 51 .dropdown-toggle;
>> 52 }
Warning: Error compiling less/bootstrap.less Use --force to continue.
I've observed this behavior with other classes, for example .navbar-right
(while for example .pull-right()
is ok), but I can't really understand what I'm doing wrong. Can anybody illuminate me?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…