Announcement

Collapse
No announcement yet.

Modifying Template vs CSS Editor

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

  • alfreema
    commented on 's reply
    Whoa. So I can dynamically set CSS values if I use the css_additional template. That could make for some really cool behavior. I will have to dive into it.

  • Wayne Luke
    replied
    Originally posted by Glenn Vergara View Post
    css_additional template is the only css template that you should edit. Other css templates should not be edited. css_additional template is a special template specifically for user defined css and it is not touched during upgrade process.
    css_fonts.css is another that can be edited and it won't be overwritten if you modify a new style or the default style. It will be overwritten if you are modifying a child of the Themes style.

    Leave a comment:


  • glennrocksvb
    commented on 's reply
    Here is the JIRA I was referring to: http://tracker.vbulletin.com/browse/VBV-16683

  • glennrocksvb
    replied
    css_additional template is the only css template that you should edit. Other css templates should not be edited. css_additional template is a special template specifically for user defined css and it is not touched during upgrade process.

    Leave a comment:


  • glennrocksvb
    replied
    Mark is right. But I prefer adding custom CSS in css_additional template in AdminCP over adding the same via Sitebuilder. This is because you can't use stylevars and other conditionals when editing css in Sitebuilder because Text Only (unlike in AdminCP where it is a checkbox and can be checked or unchecked) is enabled by default when using Sitebuilder and you cannot change it. This means that all code in the template will be treated as plain text and will not be parsed or evaluated. This was done specifically for vBCloud but it also affects self-hosted version. This is too restrictive even for vBCloud. I filed a JIRA for this but I don't have the JIRA number handy.
    Last edited by glennrocksvb; Sun 22 Oct '17, 6:04pm.

    Leave a comment:


  • alfreema
    replied
    Ok, perfect. Thanks!

    Leave a comment:


  • Mark.B
    replied
    Don't edit the css templates. Use the css editor on the front end.

    Leave a comment:


  • alfreema
    started a topic Modifying Template vs CSS Editor

    Modifying Template vs CSS Editor

    So I want to modify the size/style of my buttons. They are super large in responsive mode on a mobile phone. So with Firefox inspector I was able to easily see that what I need to modify it:

    PHP Code:
    .l-xsmall .b-button {
        
    font-size1.25rem;
        
    padding0.5rem 1rem;
        
    font-weightnormal;
        
    margin-bottom4px;

    But I am not sure the "right" place to change those. If I go to AdminCP --> Search in Templates --> Search for text and entered ".l-xsmall .b-button", I was able to find that block in css_b_button.css.

    Then if I search in the template for that string again, bingo there's the block.

    Question is, should I be modifying templates? Or should I be going to SiteBuilder's CSS Editor and just overriding stuff there? What do people that sell their own styles do? Do the modified templates travel with a style, if you export it? What is more "upgrade proof"?

Related Topics

Collapse

Working...
X