Reputation: 5737
Targeting children in LESS is easy such as:
header {
a { color: white; }
}
But what I'm asking is how to assign color: white;
to both the parent and the child? I can do:
header {
color: white;
a { color: white; }
}
But that is adding the same thing twice and I'm sure there's a better way in LESS.
Upvotes: 1
Views: 30
Reputation: 11820
If you really want nesting there, then:
header {
&, a {color: white}
}
For more details see Parent Selectors.
Upvotes: 3