HomePhabricator

UserCSSPrefsModule: Remove redundant inline text-decoration:none css rules

Tags
None
Referenced Files
None
Subscribers
None

Description

UserCSSPrefsModule: Remove redundant inline text-decoration:none css rules

By default user option 'underline' is '2' which means no skin override.

Once a upon a time, none of the popular MediaWiki skins specified whether links should have
underlines, and most browsers default to having an underline on links (when not hovering).

As such, there was an exception added for languages where underlines cause text to be unreadable.

Nowadays however all modern skins explicitly specify the intended design for links.
Neither the default skin (Vector) nor other popular skins I checked have underlines by default.
As such, this rule is redundant.

If a skin comes along that does specify underlines by default, then these rules should be placed
in that skins' stylesheet. Not in the HTML of all pages.

Incidentally, this was the last code branch in ResourceLoaderUserCSSPrefsModule that is true by
default. Which means from now on this <style> tag is automatically omitted from the HTML for
logged-out users and users that haven't changed the 'underline' or 'editfont' preference.

Implement the missing isKnownEmpty() method so that OutputPage does the automatic omission.

To test the new text-decoration rule in mediawiki.skinning:

  • Change user preference language to "ar" and observe anchor links in the interface not having underlines on-hover.
  • Change $wgLanguageCode to "ar" and observe anchor links in the content not having underlines on-hover.

History:

  • 2011 (043f98a3; r101445) Move overrides from shared.css to ResourceLoaderUserOptionsModule Also remove "!important" from underline css
  • 2011 (33293c9b; r96261) Apply "!important" to underline user option css
  • 2011 (81446abc; r91432; T31712) Move overrides from MessageXX.php to skins/common/shared.css
  • 2006 (43b2fb56; r15823) Move overrides from LanguageXX.php to MessageX.php
  • 2004 (f9f3e915) Add override to LanguageAr.php

Bug: T105313
Change-Id: I94dda30fb80b30e9c12a74a8b09065da55681929

Event Timeline