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

Node icons in extra.css when using a parent style

SchmitzIT

Well-known member
#1
I have a quick quick question. We use a "parent style" to ensure that template edits only have to be done once there, and will automatically be trickling down to the styles defined as children under it.

Now we have a bunch of customizations I'd like to see go through every child-style, but preferably without having to do them in every seperate style (to be specific, we add different icons to diffferent nodes, and have those defined in extra.css).

Is it somehow possible to do this while still allowing for the extra.css of the children to contain specific customizations for these styles?

So essentially, I'd like to add stuff like the following:

li.node_2 .nodeIcon
{
background-image: url(styles/default/entropiaplanets/node_icons/2.png) !important;
}
And preferably only have to do it in a single file, rather than4-5 seperate EXTRA.css files.

By the way. If anyone knows of an easy way to have multiple nodes have the same icon, I'm all ears.

Thanks :)

Peter
 

bambua

Well-known member
#2
It's almost like a PARENTEXTRA.css file or something would be worthwhile that is only in the parent but also doesn't get wiped out by upgrades.
 

Brogan

XenForo moderator
Staff member
#4
Create an EXTRA2.css (or whatever you want to call it, one for each style) and include that in EXTRA.css.

Make sure you include it at the end, so the additional css in EXTRA2.css comes after the original css in EXTRA.css.

Then add just the changed css to EXTRA2.css.
 

SchmitzIT

Well-known member
#5
Create an EXTRA2.css (or whatever you want to call it, one for each style) and include that in EXTRA.css.

Make sure you include it at the end, so the additional css in EXTRA2.css comes after the original css in EXTRA.css.

Then add just the changed css to EXTRA2.css.
Would I do this in the parent styles or the child styles?

And would I just use a:

Code:
<xen:require css="Extra2.css" />
to accomplish this?
 

Brogan

XenForo moderator
Staff member
#6
In the parent style create all the additional templates, one for each child style.

In the parent style, do the include in EXTRA.css for all of the additional templates.

Revert EXTRA.css in each child style, to ensure they inherit it from the parent.

In each child style add the css to its relevant template, EXTRA2.css for child style 1, EXTRA3.css for child style 2, etc.

Yes, that is how to include a css template.
 

SchmitzIT

Well-known member
#7
In the parent style create all the additional templates, one for each child style.

In the parent style, do the include in EXTRA.css for all of the additional templates.

Revert EXTRA.css in each child style, to ensure they inherit it from the parent.

In each child style add the css to its relevant template, EXTRA2.css for child style 1, EXTRA3.css for child style 2, etc.

Yes, that is how to include a css template.
I didn't manage to get this working. I tried creating the new css template both in the master style, and included it in the default EXTRA.css style. That didn't work, so I removed the template from the master style, and created it in default, and then had it required in EXTRA.css, but again, to no avail.

It did work when I directly pasted the node icons css into EXTRA.css though.

Oh well, was worth a shot :) Thanks anyway.
 

Brogan

XenForo moderator
Staff member
#8
That's the same system I use for my two styles, one parent and one child, so I'm surprised it's not working.
 

SchmitzIT

Well-known member
#9
That's the same system I use for my two styles, one parent and one child, so I'm surprised it's not working.
Would I have to do anything in the style properties, maybe? It seemed as if the include just was not picked up properly, as the styles kept showing the default behaviour (the sprite icons).
 

SchmitzIT

Well-known member
#11
Well I use EXTRA.css for my node icons, so I know it works for those.
Yeah, that's why I'm consufed about the whole thing. Even if the rest of my EXTRA.css is empty, and only the include is in there, it still doesn't recognize the icons. And I do have the !important addition in the new file.