Page MenuHomePhabricator

Brackets in dark mode
Closed, ResolvedPublicBUG REPORT

Description

In the code editor in dark mode, brackets are highlighted as if they were in light mode when text is selected inside them, making them impossible to see and making it hard to edit. Brackets are highlighted properly only for wikilinks.

obraz2.png (157×136 px, 7 KB)

obraz.png (34×229 px, 3 KB)

Event Timeline

This is still an issue in CodeMirror 6.

r980541 used a strange selector for the matching brackets, and I am not sure whether it was intentional.

.cm-matchingBracket,
.cm-focused .cm-matchingBracket {
	background-color: #eee;
	box-shadow: inset 0 0 1px 1px #999;
	font-weight: bold;
}

Change #1226296 had a related patch set uploaded (by 沈澄心; author: Prashant_32194):

[mediawiki/extensions/CodeMirror@master] Fix dark-mode bracket visibility in CodeMirror selections

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

Bhsd changed the task status from Open to In Progress.Jan 14 2026, 9:00 AM
Bhsd assigned this task to Prashant32194.

@Prashant32194 Thanks for your patch! Just a reminder: The commit message needs to be Bug: T402293 instead of Bug Id: T402293 so that gerritbot can function properly.

Bhsd moved this task from Bugs to Done on the MediaWiki-extensions-CodeMirror board.