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.

syntaxhighlight.png (944×1 px, 224 KB)

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

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

@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

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 triaged this task as Medium 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 Medium 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 Medium.
Yann updated the task description. (Show Details)
Yann added subscribers: Aklapper, gerritbot.