Custom CSS, entries at bottom supersedes those on top

  • Affected App
    WoltLab Suite Forum

    I was in process of customizing the theme using " Advanced Settings ". I had a couple of custom CSS entries of the same element. But, even though I change the colour hex code for the duplicate entry in top, WSF 5.0 is fetching hex code from the bottom most class. Thought of reporting.

    Smile , it's good for health

  • Isn't CSS always "executed" from top to bottom? In that case the last CSS rule for an item aplies. This could be diffrent if you where more specific with a selector or use !important .

    Linux: Born to Frag 8) :D

    • Official Post

    Dilip I'm sorry, but what exactly is the bug here? CSS instructions will overwrite previous entries, if one of these three conditions are met:

    • The selector has a higher specificity, e.g. .class is overwritten by body .class
    • The selector appears twice or has an equal weight, in that case the one that appears last will win
    • You're using the !important modifier
  • The selector has a higher specificity, e.g. .class is overwritten by body .class

    Those were duplicate entries

    You're using the !important modifier

    No, not in use

    The selector appears twice or has an equal weight, in that case the one that appears last will win


    Does that mean, in duplicate entries, last one will win ? Only hex codes are different.

    Smile , it's good for health

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!