For example, I have some CSS3 code:
.iMore:not (.__lod ):active {
color: #fff
}
.iMore.__lod {
color: #888
}
I need to somehow express the same thing in CSS2. I figure it would have to be more verbose, but is it even possible?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This isn’t possible. The best you can hope for is to set a default style (
.iMore), and some sort of “active” style (.__lod). Removing the active style class will “disable” the element.The problem with CSS2 is that it was never originally meant as a language to perform logic operations as CSS3 lets you do. Instead, it was designed to take what was there and–without much computation–style it based on those directives. Basically, as classes/IDs/etc are added, CSS2 lets you add on descriptors. CSS3 introduces some logic and computational structures (
nth-child, anybody?), so it’s technically not fully reversible.