Page MenuHomePhabricator

CodeMirror: document how to customize line spacing height via CSS
Closed, ResolvedPublic1 Estimated Story Points

Description

It has been requested that we allow users to customize how normal text and line spacing height in CodeMirror syntax highlighting appears. This is already possible and documented here: https://meta.wikimedia.org/wiki/Community_Tech/Wikitext_editor_syntax_highlighting#Color_and_style_customization


Acceptance criteria
  • The documentation here is updated to illustrate how to customize:
    • A way to change line spacing height

Event Timeline

Per T193210#4164456 I think what might be desired here is to set the colour of free-flowing text that is not nested in something.

So here "foo" should be given the specified colour, but not "bar":

Foo [[Main Page|bar]]

== Bar ==
Foo

If this is the case .CodeMirror-lines won't work.

For line height however, setting the line-height property on .CodeMirror-lines should work.

kaldari set the point value for this task to 1.May 1 2018, 11:55 PM

@Doc_James @Wbm1058 — There is currently no way to customize 'normal' text (such as figs on this example.) You can change the font weight of all text inside the CodeMirror surface, which may address your concern. If this is still a problem, we can create a new ticket in the MediaWiki-extensions-CodeMirror backlog.

And one friendly word or warning: change the line height at your own risk, we've seem some corner-case defects on some browsers where line height caused some blurry text. We hope it works alright for your browsers of choice!

TBolliger renamed this task from CodeMirror: document how to customize normal text and line spacing height via CSS to CodeMirror: document how to customize line spacing height via CSS.May 2 2018, 12:01 AM
TBolliger updated the task description. (Show Details)

I added a note about .CodeMirror-lines in the documentation. There is a disclaimer that this should be used "at your own risk". Many things will work fine but indeed changing the line-height will only reliably work in older wikitext editors. I should say the same is true for all of the available CSS classes, though. So really all I've done is document that .CodeMirror-lines exists.

Ping @Doc_James as requestor for this documentation.

Vvjjkkii renamed this task from CodeMirror: document how to customize line spacing height via CSS to b3daaaaaaa.Jul 1 2018, 1:13 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii removed MusikAnimal as the assignee of this task.
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed the point value for this task.
Vvjjkkii removed a subscriber: Aklapper.
Samwilson renamed this task from b3daaaaaaa to CodeMirror: document how to customize line spacing height via CSS.Jul 1 2018, 4:54 AM
Samwilson closed this task as Resolved.
Samwilson assigned this task to MusikAnimal.
Samwilson raised the priority of this task from High to Needs Triage.
Samwilson updated the task description. (Show Details)
Samwilson set the point value for this task to 1.