r99389 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99388‎ | r99389 | r99390 >
Date:04:13, 10 October 2011
Author:santhosh
Status:ok (Comments)
Tags:
Comment:
Language specific height correction for titles. Ref Bug 29405 and Bug 30809. Followup of r97788
Modified paths:
  • /trunk/phase3/skins/common/shared.css (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/shared.css
@@ -808,6 +808,25 @@
809809 background-repeat: no-repeat;
810810 }
811811
 812+/* Language specific height correction for titles. Ref Bug 29405 and Bug 30809 */
 813+/* Languages like hi or ml require slightly more vertical space to show diacritics properly */
 814+h1:lang(hi),
 815+h1:lang(ml) {
 816+ line-height: 1.5em;
 817+}
 818+h2:lang(hi),
 819+h2:lang(ml),
 820+h3:lang(hi),
 821+h3:lang(ml),
 822+h4:lang(hi),
 823+h4:lang(ml),
 824+h5:lang(hi),
 825+h5:lang(ml),
 826+h6:lang(hi),
 827+h6:lang(ml) {
 828+ line-height: 1.2em;
 829+}
 830+
812831 /* Localised ordered list numbering for some languages */
813832 ol:lang(bcc) li,
814833 ol:lang(bqi) li,

Sign-offs

UserFlagDate
Nikerabbitinspected16:11, 11 October 2011

Follow-up revisions

RevisionCommit summaryAuthorDate
r102305MFT r99387 r99395 r99456 r99457 r99682 r99683 r100013 r100024 r100108 r100212...nikerabbit18:21, 7 November 2011
r104160Follow-up r99389: Lower diacritics are invisible in titles in Indic languages...siebrand12:18, 24 November 2011
r108215Prevent #firstHeading overriding the language specific h1 height....santhosh11:24, 6 January 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r97788Zero padding for #firstHeading makes text cut for scripts like Devanagari , M...santhosh03:51, 22 September 2011

Comments

#Comment by Nikerabbit (talk | contribs)   16:11, 11 October 2011

Would it make more sense to group those lines by languages instead of header size?

#Comment by Siddhartha Ghai (talk | contribs)   16:30, 15 October 2011

One basic thing that needs to be added here is that hindi is not the only language written in the devanagari script. The hindi(hi), sanskrit(sa), bihari(bh), marathi(mr), nepali(ne), newari/nepal bhasa(new), and pali(pi) wikipedias are written in the devanagari script.

I don't know the extent but a cursory look at their main pages tells me that most of these are affected by this problem.

The kashmiri(ks) and Vlax Romani(rmy) wikipedias make use of devanagari along with arabic and latin scripts respectively. For these, it would be best to ask their communities first.

Considering the number of wikipedias I've so far seen affected, I think it would be best to check rest of the indic language based projects too before implementation.

I've tried to reproduce all alphabet-diacritic combinations possible in devanagari as section headings at http://hi.wikipedia.org/wiki/%E0%A4%B8%E0%A4%A6%E0%A4%B8%E0%A5%8D%E0%A4%AF:Siddhartha_Ghai/sandbox5

Feel free to use it for testing. :)

#Comment by Santhosh.thottingal (talk | contribs)   04:21, 16 October 2011

For other languages, ie the languages with Devanagari, we will fix once we review and test this patch in Hindi.

#Comment by Siddhartha Ghai (talk | contribs)   16:41, 15 October 2011

h2 currently seems to inherit a line height of 1.5em from div#BodyContent and I still see a problem with the diacritics. If this reduces it back to 1.2em, it won't be good. I personally see h2 fine at a line height of 1.8em, but that depends on the browser and font I think. Anyway, this should not be decreasing the line height for h2.

#Comment by Amire80 (talk | contribs)   23:12, 19 October 2011

I tested on my local wiki and it works.

This is yet another feature that would work better if it could be script-oriented rather than language-oriented, but AFAIK there's no such thing in CSS. Until there is, maybe classes called something like "script-Mlym" and "script-Deva" can be created with all the needed fixes and applied to all the needed :langs.

Status & tagging log