#Why css nesting isn't supported?
14 messages · Page 1 of 1 (latest)
I have a request for you @shut swan Please wait with marking it done until the user responds and/or acknowledges. Otherwise if users respond with another question, it might get missed.
I think we're talking about different things. I meant this nesting:
.class1 {
& .class2 {
}
}
If you write this syntax on MediaWiki:Common.css or User:<Username>/common.css then MediaWiki likes to spit out a warning but you can ignore the warning and just save the page.
After which the nesting CSS will work as expected
you should be aware that & nesting has only about 90% global usage though, so some older browsers may not render the CSS correctly (in which case the blame wouldn't be on the wiki software or platform)
https://caniuse.com/?search=%26+nesting
It didn't let me save
If you write it on a page like Template:<some filename>.css then it wouldn't let you save
This is because TemplateStyles is stricter on CSS nesting
oh