Page MenuHomePhabricator

Lineheight out of sync for long articles in NWE with syntaxhighlight
Closed, ResolvedPublic

Description

In NWE with syntaxhighlight enabled, the lineheight of the syntaxhighlight and the text in the background differs a little bit.

I can see this on all long pages, both in Firefox and Vivaldi in de.wikipedia and Vector skin.

Note how the wavy underlines move up further down the text.

I can't reproduce this issue on en.wikipedia. I'm not aware of any personal customization that influences the lineheight, but due to T185303, I can't test that.

I can fix this by setting

.mw-body-content {
    line-height: 1.5;
}

(default is 1.6), which is inherited by
<div class="CodeMirror-code" role="presentation" style="">, while
<pre class=" CodeMirror-line " role="presentation"> has an explicit line-height of 1.5em

Event Timeline

Schnark created this task.Apr 27 2018, 7:46 AM
Restricted Application added projects: VisualEditor, Community-Tech. · View Herald TranscriptApr 27 2018, 7:46 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
TBolliger added subscribers: Niharika, Esanders, TBolliger.

@Niharika @Esanders — is this more appropriate for Editing or Community Tech?

I think a similar task came up in the past that @Esanders made a patch for. I can't find it now though.

And thanks for all the useful information, @Schnark! Much appreciated.

Change 429520 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/CodeMirror@master] Apply line height selector to CodeMirror line wrapper

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

Esanders updated the task description. (Show Details)Apr 27 2018, 8:47 PM

Change 429520 merged by jenkins-bot:
[mediawiki/extensions/CodeMirror@master] Apply line height selector to CodeMirror line wrapper

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

Deskana closed this task as Resolved.Apr 30 2018, 2:54 PM
Deskana triaged this task as Normal priority.
Vvjjkkii renamed this task from Lineheight out of sync for long articles in NWE with syntaxhighlight to 43daaaaaaa.Jul 1 2018, 1:13 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii removed Esanders as the assignee of this task.
Vvjjkkii raised the priority of this task from Normal to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed subscribers: gerritbot, Aklapper.
Yann renamed this task from 43daaaaaaa to Lineheight out of sync for long articles in NWE with syntaxhighlight.Jul 1 2018, 11:27 AM
Yann assigned this task to Esanders.
Yann lowered the priority of this task from High to Normal.
Yann updated the task description. (Show Details)
Yann added subscribers: Aklapper, gerritbot.
Yann closed this task as Resolved.Jul 1 2018, 12:16 PM