From 9817d4fb13305c1bd5e5a0f41e8fe3f582406a39 Mon Sep 17 00:00:00 2001 From: Alexander Yastrebov Date: Sat, 30 Sep 2023 23:05:33 +0000 Subject: [PATCH] _content/tour: add dark theme cursor and selection styles Add styles for dark theme cursor and selection. Cursor color set equal to the foreground color. Focused selection color set to the complement color of the background color and inactive selection is the lighter tint of it. Fixes golang/go#63313 Change-Id: If9702f45262eea330d42ec0fd9717b36da026540 GitHub-Last-Rev: 1545bbaea9a4652720116923983b74f3c8710aed GitHub-Pull-Request: golang/website#253 Reviewed-on: https://go-review.googlesource.com/c/website/+/531856 TryBot-Result: Gopher Robot Auto-Submit: Suzy Mueller LUCI-TryBot-Result: Go LUCI Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Hyang-Ah Hana Kim Reviewed-by: Suzy Mueller --- _content/tour/static/css/app.css | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/_content/tour/static/css/app.css b/_content/tour/static/css/app.css index 30d7d8e7..c8cd9db7 100755 --- a/_content/tour/static/css/app.css +++ b/_content/tour/static/css/app.css @@ -396,6 +396,13 @@ a#run, a#kill { [data-theme='dark'] .cm-s-default .cm-comment { color: #fb6; } + +[data-theme='dark'] .CodeMirror-cursor { border-color: #BABABA; } +[data-theme='dark'] .CodeMirror-selected { background: #55483a; } +[data-theme='dark'] .CodeMirror-focused .CodeMirror-selected { background: #433425; } +[data-theme='dark'] .CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #433425; } +[data-theme='dark'] .CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #433425; } + @media (min-width: 601px) { #editor-container { position: fixed;