Page MenuHomePhabricator

Develop or select a dark-friendlier color palette for syntax highlighting
Closed, ResolvedPublic

Description

Background

Syntax highlight appears the same in light and dark mode. Ideally it would use its own palette or select one of the ones from https://pygments.org/styles/ and then update updateCSS.php accordingly.

User story

As a reader I want to see code snippets in dark mode.

Requirements

Communication criteria - does this need an announcement or discussion?

N/A

Rollback plan

N/A

This task was created by Version 1.0.0 of the Web team task template using phabulous

Event Timeline

Jdlrobson triaged this task as Medium priority.Jun 3 2024, 3:08 PM
Jdlrobson updated the task description. (Show Details)
Diskdance subscribed.

This is blocked by T285859. We should open up style selection in Special:Preference and provide defaults for light and dark mode.

This is blocked by T285859. We should open up style selection in Special:Preference and provide defaults for light and dark mode.

As someone who is using light mode because syntax highlighting is unusable in dark mode (at least for my eyesight), it would be really good to see a shorter-term solution, rather than waiting for T285859.

Playing with Inspector in my browser right now, even just putting in a blanket rule to knock colours down 3 (so #ffc#cca for templates, #eef#bbc for links, #fef#cbc for HTML tags, #eee#bbb for bold and italics, and so on) would be a more-than-adequate stopgap.

{F56752183}

Playing with Inspector in my browser right now, even just putting in a blanket rule to knock colours down 3 (so #ffc#cca for templates, #eef#bbc for links, #fef#cbc for HTML tags, #eee#bbb for bold and italics, and so on) would be a more-than-adequate stopgap.

This task is about the display of pages with syntax highlighted blocks. You are probably looking for T365311: Syntax highlighter is broken on Dark Mode.

Playing with Inspector in my browser right now, even just putting in a blanket rule to knock colours down 3 (so #ffc#cca for templates, #eef#bbc for links, #fef#cbc for HTML tags, #eee#bbb for bold and italics, and so on) would be a more-than-adequate stopgap.

This task is about the display of pages with syntax highlighted blocks. You are probably looking for T365311: Syntax highlighter is broken on Dark Mode.

Aha, thank you! 😳

Change #1076237 had a related patch set uploaded (by SD0001; author: SD0001):

[mediawiki/extensions/SyntaxHighlight_GeSHi@master] Support dark mode for code blocks

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

Change #1076237 merged by jenkins-bot:

[mediawiki/extensions/SyntaxHighlight_GeSHi@master] Support dark mode for code blocks

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

Change #1076414 had a related patch set uploaded (by Majavah; author: Majavah):

[mediawiki/extensions/SyntaxHighlight_GeSHi@master] Make line numbering appear dark in dark mode

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

Change #1076414 merged by jenkins-bot:

[mediawiki/extensions/SyntaxHighlight_GeSHi@master] Make line numbering appear dark in dark mode

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

taavi assigned this task to SD0001.
taavi updated Other Assignee, added: taavi.