Additional.css vs stylevars

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Recronin
    Member
    • Jan 2010
    • 82

    [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?
  • Shadab
    Senior Member
    • Nov 2007
    • 143
    • 3.8.x

    #2
    Originally posted by Recronin
    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.

    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

    • Andy
      Senior Member
      • Jan 2002
      • 5886
      • 4.1.x

      #3
      Originally posted by Recronin
      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

      • Recronin
        Member
        • Jan 2010
        • 82

        #4
        Thanks Shadab, I forgot about that one.

        Andy - why should stylevars be used? : /

        Comment

        • Andy
          Senior Member
          • Jan 2002
          • 5886
          • 4.1.x

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

          Comment

          • Audentio
            New Member
            • Jul 2007
            • 15
            • 3.6.x

            #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

            • cfish
              Senior Member
              • Feb 2006
              • 165

              #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

              • gfreeau
                New Member
                • Aug 2010
                • 1

                #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...