• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Lack of interest Add style name (or id) to html classes

CyberAP

Well-known member
#1
If we make some modifications to styles via extra.css then all our child-styles inherit them if they don't have modified extra.css already. But if our styles are very different (for example: different #QuickSearch positioning) it may cause some extra tweaking, that means modifying every style extra.css template each time we want to change something. But if we have style name or id in the head classes we can just type in: html.default {} and then apply changes to any style with only one template.
 

James

Well-known member
#2
If we make some modifications to styles via extra.css then all our child-styles inherit them if they don't have modified extra.css already. But if our styles are very different (for example: different #QuickSearch positioning) it may cause some extra tweaking, that means modifying every style extra.css template each time we want to change something. But if we have style name or id in the head classes we can just type in: html.default {} and then apply changes to any style with only one template.
Why can't you use the content div?
Code:
div#content.template_name{
code
}
 

Mike

XenForo developer
Staff member
#6
But if our styles are very different (for example: different #QuickSearch positioning)
If they're very different, I'm not sure it makes sense to set them up in a hierarchy. :)

it may cause some extra tweaking, that means modifying every style extra.css template each time we want to change something.
It sounds like your parent style is a base (not necessarily complete) style, so why not do what we do with extra.css for it? Have your extra.css include extra2.css and make it blank in the base style, and just modify extra2.css in the child style.
 

CyberAP

Well-known member
#7
If they're very different, I'm not sure it makes sense to set them up in a hierarchy. :).
Every style is a modification of Default style, so they all have similar classes.

It sounds like your parent style is a base (not necessarily complete) style, so why not do what we do with extra.css for it? Have your extra.css include extra2.css and make it blank in the base style, and just modify extra2.css in the child style.
Well, that's a good idea. Thanks!