In creating some styling docs for a designer, I've noticed something odd about the .links class:
For primary/secondary links, we have:
- No DIV wrapper
- UL: "links primary-links"
Taxonomy terms:
- DIV wrapper: "terms"
- UL: "links inline"
Node links:
- DIV wrapper: "links"
- UL: "links inline"
The only way to securely grab onto node links is to distinguish that the links class is on a DIV rather than a UL:
.links li {} // gets all links
div.links .links li
This doesn't make for very readable CSS and it's a bit confusing to have the same class name at two levels, meaning slightly different things.
I would suggest node-links for the wrapping DIV on node links.
Comments
Comment #1
joachim commentedThis is a patch for all the tpl files in core themes.
This is a bigger change than I initially thought, as there's a few .links rules in stylesheets that set things like padding that would have previously applied to both the enclosing div and the UL.
I'll wait for any +1s before diving in further :)
Comment #2
Jeff Burnz commentedThinking this is way old and not really relevant anymore?
Comment #3
joachim commentedNode links:
- DIV wrapper: "links"
- UL: "links inline"
This is still a problem in Garland. I'm going to say it's a bug, as it's lousy use of classes.