Andrey (azangru) wrote,

CSS at its worst — when the order in which the rules are defined in a stylesheet matters, because, given the same selector specificity, the latest defined selector wins.

E.g. given this html structure:

If the child-foo class is defined after the child class, the border will have one color:

But if the child-foo class is defined before the child class, the border will have a different color:

And I was certain — certain — that given that the child-foo class if declared after the child class in the html class attribute, the child-foo will always win. But no, CSS reminded me today about its weirdness.

  • (no subject)

    Which/whose corporate interests is he talking about? Which corporations are interested in what? I am so confused.

  • (no subject)

    Two appearances of Noam Chomsky, in which he goes hard on the unvaccinated. Take, traffic rules, he says. Suppose, he says, I don't want to…

  • (no subject)

    Joe Rogan's episode with Michael Shellenberger is very good.

  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.