I want to build some CSS along these lines:
h1,h2,h3,h4,h5,h6 {some rule}
h1 a,h2 a,h3 a,h4 a,h5 a,h6 a {color: inherit;}
h1 span,h2 span,h3 span,h4 span,h5 span,h6 span {another rule;}
It would be useful if I could create a variable like this:
@headings: h1,h2,h3,h4,h5,h6;
and then maybe do something like this:
@{headings} {
& a {color: inherit;}
}
Unfortunately this gives me:
h1, h2, h3, h4, h5, h6 a {
color: inherit;
}
Is what I want possible? This is a simple version of what I want to do but I would also find useful for working with HTML input types and other instances of multiple selectors that often appear together.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…