musyc: Silver flute resting diagonally across sheet music (Default)
Come Hell or High Water ([personal profile] musyc) wrote in [community profile] style_system2011-12-25 08:30 pm
Entry tags:

Multilevel Tags

SOLVED

Is there a class for each level of a multilevel tag? I want to make the first tier of mine on my popular tags module have a different appearance (small caps, italics, something). I found the span.non-link-tag class, but as far as I can tell that's being used for both first and second tiers, and I want just the first.

So if I had something like:
foo: bar: llamas
foo: bar: wildebeest
foo: ticky: pandas

I'd want "foo" to be italicized/capped, but not "bar" or "ticky".
branchandroot: oak against sky (Default)

[personal profile] branchandroot 2011-12-26 01:44 am (UTC)(link)
They do not have classes; the way you do that is defining nested list items. So the first tier is:

ul.tags li

while the second is

ul.tags li li

So what you do is, set the first tier to the style you want and then unset that for the second tier (which will also catch the third, since li li catches /any/ nested list item, of any depth).
branchandroot: oak against sky (Default)

[personal profile] branchandroot 2011-12-26 02:29 am (UTC)(link)
*headdesk* Don't listen to me when I've been doing code all day, seriously.

I meant:

.module-tags_multilevel ul li

and

.module-tags_multilevel ul li li

The .tags would be for the tags page, not the module. The non-link-tag will work too, though, if none of your top-tier items have anything in them. So, if foo only ever exists to be a header, and nothing is ever tagged foo, yeah, that'll do it.