1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 18:17:20 +00:00

CodeMirror: Make colored selections based on palette work in chrome, too (#5215)

* Make colored selections based on palette work in chrome, too

* Update styles.tid
This commit is contained in:
Simon Huber 2020-12-06 14:00:19 +01:00 committed by GitHub
parent 005f7c55b6
commit b2d270a7e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,7 +17,10 @@ name: tiddlywiki
\end \end
\define set-selection-background-css(colour,colourA,colourB) \define set-selection-background-css(colour,colourA,colourB)
<$set name="backgroundColour" value=<<contrastcolour target:"""$colour$""" fallbackTarget:"""""" colourA:"""$colourA$""" colourB:"""$colourB$""">>> <$set name="backgroundColour" value=<<contrastcolour target:"""$colour$""" fallbackTarget:"""""" colourA:"""$colourA$""" colourB:"""$colourB$""">>>
.cm-s-tiddlywiki div.CodeMirror-selected, .cm-s-tiddlywiki .CodeMirror-selectedtext, .cm-s-tiddlywiki .CodeMirror-selected, .cm-s-tiddlywiki .CodeMirror-line::selection, .cm-s-tiddlywiki .CodeMirror-line > span::selection, .cm-s-tiddlywiki .CodeMirror-line > span > span::selection, .cm-s-tiddlywiki .CodeMirror-line::-moz-selection, .cm-s-tiddlywiki .CodeMirror-line > span::-moz-selection, .cm-s-tiddlywiki .CodeMirror-line > span > span::-moz-selection { background: <<backgroundColour>> ; } .cm-s-tiddlywiki div.CodeMirror-selected { background: <<backgroundColour>>; }
.cm-s-tiddlywiki.CodeMirror ::selection { background: <<backgroundColour>>; }
.cm-s-tiddlywiki .CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: <<backgroundColour>>; }
.cm-s-tiddlywiki .CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: <<backgroundColour>>; }
</$set> </$set>
\end \end
\define set-selection-background-colours(palette) \define set-selection-background-colours(palette)