Page MenuHomePhabricator

Per-page CSS classes for all pages in hierarchy
Closed, DeclinedPublic


Author: bugzilla

The new per-page CSS feature is great, but I think it would be useful if <body>
had classes for all pages in the current page hierarchy.
For example, if you had a page foo/bar/meh, instead of having one <body> class
of "page-foo_bar_meh", you'd have three: "page-foo page-foo_bar
page-foo_bar_meh". This would be useful for places like StrategyWiki
(, where guides are organised using sub-pages.

I suppose this is an extension of bug #5795.

Version: 1.9.x
Severity: enhancement



Related Objects

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:37 PM
bzimport added a project: MediaWiki-Interface.
bzimport set Reference to bz9174.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Mar 5 2007, 9:17 PM

ayg wrote:

It would make more sense to have pageparent-foo_bar or something.

body[className*=page-foo] matches page-foo, page-foo_bar and page-foo_bar_meh
body[className*=page-foo_bar] matches page-foo_bar and page-foo_bar_meh

So adding additional classes doesn't seem to be neccessary here