Author: M8R-cyc3n3
Description:
Here's one example; let's say i want to set all links
pink if i'm on Special:Contributions. Not so easy:
.page-Special_Contributions a { color:pink; }
But if I go to [[Special:Contributions/Some_user]] and
look closely i see that it produces a unique className
like ".page-Special_Contributions_Some_user" for each
"sub-page", despite them not being sub-pages but rather
a short-hand for the "target" parameter cf.
/index.php?title=Special:Contributions&target=Some_user
is a completely identical page except for the user-name
not being part of its body-class.
target-specific skinning of special pages *may* have a
few weird and niche uses, but i doubt it's what most
people would expect or ever want.
Looks like the cleanest way is to fulfill the example
exercise is to inject css via js? Poor.
if(wgPageName=="Special:Contributions")
appendCSS("a { color:pink; }");
Well i did notice that wgPageName never includes the
user-name or anything else after the slash in the url
of a "Special:" page.
Surely this and the body-class ought, at a minimum, to
be mutually consistent...?
Version: unspecified
Severity: minor