Page MenuHomePhabricator

Superscript reference numbers cause increase in line height with devanagari text
Closed, ResolvedPublic

Description

the problem as seen in google chrome

On hindi wikipedia, wherever a reference is present in a line, that line seems to be slightly higher than lines without references, i.e the superscript seems to increase line height slightly.

Example: see http://hi.wikipedia.org/s/43g

Though not a functional problem, this is annoying. Also, it seems to be happening cross-browser, and does not seem to depend upon whether WebFonts is active or not.

I have seen this in 22.0.1229.94 m, firefox 15.0.1, opera 12.01, IE8 and safari 5.0.3 with Windows 7 Home Basic X64.


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=49965

Attached:

line_height_problem_in_chrome.png (641×1 px, 120 KB)

Details

Reference
bz41442

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:48 AM
bzimport added projects: Cite, I18n.
bzimport set Reference to bz41442.
bzimport added a subscriber: Unknown Object (MLST).

Setting sup.references line-height to 1 makes it less worse, but the only way I could get it fully resolved was by adding:
sup.reference { position: absolute; line-height: 1; }
which probably isn't a good solution.

(In reply to comment #1)

Setting sup.references line-height to 1 makes it less worse, but the only way I
could get it fully resolved was by adding:
sup.reference { position: absolute; line-height: 1; }
which probably isn't a good solution.

I've added sup.reference {line-height:1;} to the Common.css for now.

http://hi.wikipedia.org/w/index.php?title=%E0%A4%AE%E0%A5%80%E0%A4%A1%E0%A4%BF%E0%A4%AF%E0%A4%BE%E0%A4%B5%E0%A4%BF%E0%A4%95%E0%A4%BF%3ACommon.css&diff=1943654&oldid=1922969

Is this still a problem? We improved the line-height handling somewhat per bug 49965.

(In reply to Bartosz Dziewoński from comment #3)

Is this still a problem? We improved the line-height handling somewhat per
bug 49965.

Tested at https://hi.wikipedia.org/wiki/स्लोवाकिया in google chrome Version 33.0.1750.154 m in Windows 7 X64

It seems the problem is fixed for the plain text (article content). Even adding position:aboslute doesn't seem to make a difference there.

However, in the infobox, in the line:

  • Date 1 जनवरी, 1993[1]

adding position:absolute to sup.reference styles using the chrome dev tools does seem to slightly decrease the line-height. Changing the line-height:1 to line-height:0 also seems to slightly decrease the line-height, but again only in the infobox.

Also, per bug 49965 , can sup.reference {line-height:1;} be removed from the common.css which was added per comment 2 ?

@Siddhartha-Ghai: Yes, sup.reference {line-height:1;} can be removed from the common.css now. I went ahead and did so.