Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Conflicting style issue

422422 MVP
edited November 2011 in Vanilla 2.0 - 2.8
You have style and custom css.
You also have classes for bigbutton in both, both are loading. You dont use !important , so how does it differentiate.

I am using cutom stylesheet, and also stylesheet switcher, but having issues with styles inheriting classes from style.css and overiding classes in custom css.

By the way bigbutton just an example

There was an error rendering this rich post.

Best Answer

  • jspautschjspautsch ✭✭✭
    edited November 2011 Answer ✓
    You also have classes for bigbutton in both, both are loading. You dont use !important , so how does it differentiate.
    All other things being equal custom.css overrides style.css because it's linked after.

    I say all other things being equal because between the two stylesheets more specific tags will always win out, e.g. #Content .BigButton will always override .BigButton, no matter which sheet it's in.

Answers

  • jspautschjspautsch ✭✭✭
    edited November 2011 Answer ✓
    You also have classes for bigbutton in both, both are loading. You dont use !important , so how does it differentiate.
    All other things being equal custom.css overrides style.css because it's linked after.

    I say all other things being equal because between the two stylesheets more specific tags will always win out, e.g. #Content .BigButton will always override .BigButton, no matter which sheet it's in.
  • Well that was my thought too.. Hmm, will recheck our code. Noticed on your themes you do the same, so must work. Thanks.

    There was an error rendering this rich post.

  • jspautschjspautsch ✭✭✭
    edited November 2011
    Yeah I do, although I noticed that if you drop style.css into your theme it replaces the default style.css completely, which would give you more control. If I were to make another theme I think that's what I would do, it would make for less CSS overall and avoid all the annoying override issues.
  • 422422 MVP
    edited November 2011
    Yeah well thats my issue. Doesnt seem to be a slick way of injecting extra css files.

    I drop copy of style.css into ustom theme and modify it. But then say i create styleswitch, adding abc.css , style.css attributes overwrite my custom classes etc. I must be adding them wrong. Its all good if i dot use styleswitch. Think i need to recode it.

    Scuse spelling errors im on bloody ipad.

    There was an error rendering this rich post.

  • set up temp forums, to highlight the issue. http://vanillaskins.com/forums/

    Must be my styleswitch code, will check again later when I get back.

    There was an error rendering this rich post.

Sign In or Register to comment.