FS#29021 - {wiki} CSS: font-weight consistency for links under #bodyContent

Attached to Project: Arch Linux
Opened by Dario Giovannetti (kynikos) - Tuesday, 20 March 2012, 21:28 GMT
Last edited by Pierre Schmitz (Pierre) - Tuesday, 01 May 2012, 10:44 GMT
Task Type Bug Report
Category Web Sites
Status Closed
Assigned To Pierre Schmitz (Pierre)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

I'm not sure where are exactly the CSS files for the wiki, but currently the following rule seems to be responsible for setting the font-weight of links under #bodyContent (found with Firebug):

#bodyContent p a, #bodyContent li a, #bodyContent td a {
font-weight: bold;
}

The problem is that there are many cases, not included by this rule, that get normal-weight links, for example:
* links in definition lists (lines starting with colons)
* links in templates like Note or Warning (links are children of divs)

Is it possible to simplify the rule to:

#bodyContent a {
font-weight: bold;
}

?
I've tested it with Firebug and it seems to work fine in many pages.

Thank you
This task depends upon

Closed by  Pierre Schmitz (Pierre)
Tuesday, 01 May 2012, 10:44 GMT
Reason for closing:  Fixed
Comment by Desmond Cox (pointone) - Wednesday, 21 March 2012, 01:50 GMT
Agreed -- the current scheme seems rather arbitrary in terms of what is bold, resulting in many inconsistencies. Either every link should be bold or none should be. The current implementation is confusing especially in talk pages where replies are frequently indented.
Comment by Dario Giovannetti (kynikos) - Thursday, 22 March 2012, 00:26 GMT
After experimenting a bit I've discovered some interesting things, 2 in particular:

1) setting the rule for #bodyContent would affect also some Special Pages that currently are differentiating bold links from non-bold links, for example the Recent Changes (e.g. the "Show last" number in the fieldset at the top highlights the current choice in bold)

2) also the current rule (#bodyContent p a, #bodyContent li a, #bodyContent td a), though, is affecting some Special Pages, for example:
* it's hiding the feature in the Recent Changes that highligts in bold the links for the articles in one's own watchlist (try to remove the rule with Firebug and see for yourself, if you have some articles in your watchlist that are listed in the recent changes)
* have you ever wondered what the note at the bottom of Special:SpecialPages means? (the one that says that Restricted special pages are highlighted in bold, at least visible to admins) Well, disable the mentioned css rule and tadaaa... everything makes sense :)

It's clear to me that overwriting the default rules for #bodyContent breaks some useful MediaWiki features, so now I'd like to discuss the possibility of replacing:

#bodyContent p a,
#bodyContent li a,
#bodyContent td a {
font-weight: bold;
}

with:

div.mw-content-ltr a,
div.mw-content-rtl a {
font-weight: bold;
}

(Although, don't ask me why, also Hebrew pages seem to be under div.mw-content-ltr ...)

Actually, if we want to follow the (for-some-including-me good) practice of starting all non-general css rules from ids, we should use:

#bodyContent > div.mw-content-ltr a, ...

And now I don't know if there are also other rules that are hiding other MediaWiki features...

Loading...