Page MenuHomePhabricator

Update shared.css ordered list rules
Open, Needs TriagePublic

Description

Currently /resources/src/mediawiki.legacy/shared.css features

/* Localised ordered list numbering for some languages */
ol:lang( azb ) li,
ol:lang( bcc ) li,
ol:lang( bgn ) li,
ol:lang( bqi ) li,
ol:lang( fa ) li,
ol:lang( glk ) li,
ol:lang( kk-arab ) li,
ol:lang( lrc ) li,
ol:lang( luz ) li,
ol:lang( mzn ) li {
	list-style-type: -moz-persian;
	list-style-type: persian;
}

ol:lang( ckb ) li,
ol:lang( sdh ) li {
	list-style-type: -moz-arabic-indic;
	list-style-type: arabic-indic;
}

ol:lang( hi ) li,
ol:lang( mai ) li,
ol:lang( mr ) li,
ol:lang( ne ) li {
	list-style-type: -moz-devanagari;
	list-style-type: devanagari;
}

ol:lang( as ) li,
ol:lang( bn ) li {
	list-style-type: -moz-bengali;
	list-style-type: bengali;
}

ol:lang( or ) li {
	list-style-type: -moz-oriya;
	list-style-type: oriya;
}

Issues

  • Only a very limited selection of languages is currently receiving treatment, compare parent task and https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type
  • -moz prefixes are largely outdated, they affect only Firefox < 33
    • Evaluate if the data provided in MDN article is correct and newer Firefox & Firefox/Android are receiving the right styling.

Test article

https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type#Values

Alternatively without -moz vendor prefixes:
https://www.mediawiki.org/wiki/User:Volker_E._(WMF)/sandbox/Ordered_Lists

Event Timeline

Volker_E created this task.Apr 30 2019, 8:13 PM
Volker_E updated the task description. (Show Details)Apr 30 2019, 8:16 PM
Volker_E updated the task description. (Show Details)Apr 30 2019, 8:53 PM

From limited testing at BrowserStack, recent Firefox/Android (v66) shows the right numerals from testing above.

Data on MDN is wrong, -moz prefixes are needed for all languages on Firefox < 33.

Volker_E updated the task description. (Show Details)Apr 30 2019, 9:41 PM
Volker_E updated the task description. (Show Details)Apr 30 2019, 10:05 PM

Firefox 3/Win XP is the one in browser shares under 33 at 0.1%.
Firefox 25/Win 7 is the next follower at 0.0%.

Change 507635 had a related patch set uploaded (by VolkerE; owner: VolkerE):
[mediawiki/core@master] Remove -moz vendor prefixes

https://gerrit.wikimedia.org/r/507635

Change 507635 merged by jenkins-bot:
[mediawiki/core@master] Remove -moz vendor prefixes

https://gerrit.wikimedia.org/r/507635

Care should be used when adding new languages to this list. Some language communities don't actually want localised numbers (they may be archaic) – this usually is reflected in the PHP side as well. Some languages are just no aware of this possibility and can be added. Some languages just don't have communities that would have asked to be added on this list.