Page MenuHomePhabricator

place styles _inside_ HTML tags
Closed, DeclinedPublic

Description

Looking at the implementation of mw-specialpagerestricted:

<li class="mw-specialpages-page mw-specialpagerestricted"><strong><a href="/index.php?title=..." title="特殊:未被監視的頁面">Unwatched pages</a></strong></li>

One wonders 'why have they placed the style ouside the HTML tag
instead of inside?'

As can be seen from this little experiment (done on Firefox)

<span style="font-weight:normal"><strong>style outside</strong></span>
<strong><span style="font-weight:normal">style inside</span></strong>

your doing that leaves the WikiSysop with no way to override it, if he
so pleases, via MediaWiki:Common.css .

At the bottom of the page one finds

<strong class="mw-specialpagerestricted">Restricted special pages.</strong>

which is also fine, as one can override the <strong> with stylesheets,
accoding to my experiments.

So barring any other considerations that I am not aware of, please fix
it, and along with it, and other such places in the code where the
styles are on the outside.


Version: 1.18.x
Severity: normal
URL: http://abj.jidanni.org/index.php?title=Special:SpecialPages

Details

Reference
bz26519

Related Objects

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 11:22 PM
bzimport set Reference to bz26519.
bzimport added a subscriber: Unknown Object (MLST).

Note of course that one must be a WikiSysop on the machine of the above URL. So please adjust the URL to one where you are a WikiSysop, in order to see what I am talking about.

I'm not sure this is a bug.

It appears that maybe you don't understand how style sheets work?

span strong { color: red; }
strong span { color: blue; }

Or in your first instance:

li.mw-specialpagerestricted strong a { color: red; }

I don't see a bug here.

(In reply to comment #2)
So there always is a way to overpower <strong> via
MediaWiki:Common.css ! Now can you please tell that to the fellow in
Bug 26415 Comment 12 about <i> too? Thank you!

Note I do not wish to affect all the <strong> on the whole website...

I really don't think I can comment any further. I think you should learn how to use CSS.

I am closing this WONTFIX; it's not a bug.

Thank you. I can confirm that using
.mw-specialpagerestricted strong { font-weight:normal; }
.mw-specialpagerestricted { font-weight:normal; }
overpowers every instance of that <strong> there. Now I will take it to Bug 26415 as proof that one can always overpower any such HTML tags.