Announcement

Collapse
No announcement yet.

Additional.css vs stylevars

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [vB4] Additional.css vs stylevars

    Personally I'm finding it much easier to style my vB site using "additional.css" in the edit templates section rather than using stylevars. Breadcrumbs for example have no stylevars value, so in my customized css I defined them to how I wanted them to look and sure enough the result came out perfectly.

    I believe I'm going to theme using strictly additional.css from now on since it seems to be much more versatile, especially to those familiar with CSS.

    One concern I have: will additional.css *always* override a value should it be defined elsewhere in vB?

  • #2
    Originally posted by Recronin View Post
    One concern I have: will additional.css *always* override a value should it be defined elsewhere in vB?
    Ideally it should. But if it does not; you can always add !important to your CSS attribute's value.

    http://www.w3.org/TR/CSS2/cascade.html#important-rules
    The joy of an early release lasts but a short time. The bitterness of an unusable system lasts for years.
    GeekPoint Forum | Articles & Reference

    Comment


    • #3
      Originally posted by Recronin View Post
      I believe I'm going to theme using strictly additional.css from now on since it seems to be much more versatile, especially to those familiar with CSS.
      It's best to use both the StyleVars and the additional.css template.

      Comment


      • #4
        Thanks Shadab, I forgot about that one.

        Andy - why should stylevars be used? : /

        Comment


        • #5
          Originally posted by Recronin View Post
          Andy - why should stylevars be used? : /
          Because it's easier and more efficient to change one StyleVar which can effect dozens of elements.

          Comment


          • #6
            Originally posted by Andy
            Because it's easier and more efficient to change one StyleVar which can effect dozens of elements.
            Yes, that would be ideal. However, there are hundreds of stylevars. That defeats the purpose entirely.

            Comment


            • #7
              Like Andy, I've used a combination of the 2. Start by using stylevars to make as many changes as needed and then fine-tune with additional CSS. I've also tried to use as many stylevar variables in my additional.css as I can. I believe this to be the most efficient way of working, otherwise all you're doing with additional.css is overwriting previous rules and that seems wasteful. Having said that, my additional.css file now runs to over 500 lines but that's more to do with the messy markup than anything else.
              My vBulletin: CADTutor - AutoCAD Forums

              Comment


              • #8
                I use a combination of the two. I wrote a post on it: vBulletin 4: StyleVars vs Additional.css

                I think in time stylevars will be improved a lot more as well.

                Comment

                widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                Working...
                X