Without grouping we could do:
.footer_content a:link {
color: #FFFFFF;
}
.footer_content a:visited {
color: #FFFFFF;
}
With grouping:
.footer_content a:link, .footer_content a:visited {
color: #FFFFFF;
}
is there a way to define the css selector to get rid of the extra .footer_content declaration that does the same thing? Something that would looking a bit like this:
.footer_content (a:link, a:visited) {
color: #FFFFFF;
}
There currently is not a universally supported way of achieving that.
However, the experimental :any() selector would make that possible, if it gets implemented and standardised. It is not supported in any browser but the latest Firefox nightlies yet.
You can achieve something kinda similar with Sass, which "compiles down" to CSS.
In Sass you would use nesting, like so:
.footer_content {
a:link, a:visited {
color: #FFFFFF;
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With