I started using LESS today. But it's kinda weird. This code does not work. I get an error:
! Variable Name Error: @linkColor in a is undefined.
My bootstrap:
@import "variables.less";
@import "normalize.less";
variables.less:
@linkColor: #08c;
@linkColorHover: darken(@linkColor, 15%);
normalize.less:
a {
color: @linkColor;
}
a:visited {
color: @linkColor;
}
a:hover {
color: @linkColorHover;
}
When I make an
@import "variables.less"
in the normalize.less file, everything works fine.
Thanks for your help :)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…