Page MenuHomePhabricator

CSS classes indicating the namespace linked to
Closed, DeclinedPublic

Description

Author: rene.kijewski

Description:
It would be often helpful, if a wikilink [[User:s.b.]] would render a code like <a href="..." class="ns-2">...</a> to let JavaScripts more easily iterate over a certain kind of links. This should of cause not interfere with the existing CSS classes "new", "mw-redirect" and whatsoever.
E.g. for scripts that highlight links to admins' user pages.


Version: unspecified
Severity: enhancement

Details

Reference
bz21797

Event Timeline

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

ayg wrote:

We output too many classes already; this would be excessive. WONTFIX, IMO. If this would be useful, you can parse the href to get the namespace, given wgServer and a list of all namespaces.

Closing WONTFIX per comment #1, which I agree with wholeheartedly. The class creep needs to stop.

rene.kijewski wrote:

(In reply to comment #1)

We output too many classes already; this would be excessive. WONTFIX, IMO. If
this would be useful, you can parse the href to get the namespace, given
wgServer and a list of all namespaces.

I don't think it would be excessive. At most there would be 15 (well gzip'able) characters more per link. Even if there are a hundred links on a page, it still produces less characters than the <head> section.
My proposal could be used together with CSS only as well. So it would do something for the usability campaign just as well ...

ayg wrote:

Yes, every little change like this only adds a few more bytes. Add them together and you get a lot more bytes. The <head> is atrociously large as well.