mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
Update codemirror styles (#5198)
This commit is contained in:
parent
9825b5b4a0
commit
ae5d78b4dd
@ -3,6 +3,21 @@ tags: [[$:/tags/Stylesheet]]
|
||||
module-type: codemirror-theme
|
||||
name: tiddlywiki
|
||||
|
||||
\define set-fat-cursor-background-css(colour,colourA,colourB)
|
||||
<$set name="backgroundColour" value=<<contrastcolour target:"""$colour$""" fallbackTarget:"""""" colourA:"""$colourA$""" colourB:"""$colourB$""">>>
|
||||
.cm-s-tiddlywiki.cm-fat-cursor .CodeMirror-cursor { background: <<backgroundColour>>; }
|
||||
.cm-s-tiddlywiki .cm-animate-fat-cursor { background-color: <<backgroundColour>>; }
|
||||
</$set>
|
||||
\end
|
||||
\define set-fat-cursor-background-colours(palette)
|
||||
<$macrocall $name="set-fat-cursor-background-css" colour={{$palette$##foreground}} colourA="#77ee77" colourB="#586e75"/>
|
||||
\end
|
||||
\define set-fat-cursor-background()
|
||||
<$macrocall $name="set-fat-cursor-background-colours" palette={{$:/palette}}/>
|
||||
\end
|
||||
|
||||
\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline macrocallblock
|
||||
|
||||
/* Make the editor resize to fit its content */
|
||||
|
||||
.CodeMirror {
|
||||
@ -37,37 +52,25 @@ name: tiddlywiki
|
||||
.cm-s-tiddlywiki .CodeMirror-line > span::-moz-selection,
|
||||
.cm-s-tiddlywiki .CodeMirror-line > span > span::-moz-selection { background: <<colour selection-background>>; }
|
||||
.cm-s-tiddlywiki span.cm-comment { color: <<colour muted-foreground>>; font-style:italic; font-weight:normal; }
|
||||
.cm-s-tiddlywiki .CodeMirror-activeline-background, .cm-s-tiddlywiki .CodeMirror-activeline-gutter .CodeMirror-linenumber { background: <<colour background>>; }
|
||||
.cm-s-tiddlywiki .CodeMirror-activeline .CodeMirror-linenumber.CodeMirror-gutter-elt { background: <<colour primary>>; color: <<colour background>>; }
|
||||
.cm-s-tiddlywiki .CodeMirror-matchingbracket { background: <<colour primary>>; color:<<colour foreground>> !important; }
|
||||
.cm-s-tiddlywiki span.cm-matchhighlight { color: <<colour foreground>>; background-color: <<colour primary>>; font-weight: normal;}
|
||||
.cm-s-tiddlywiki span.cm-searching { color: <<colour foreground>>; background-color: <<colour primary>>; font-weight: normal;}
|
||||
|
||||
|
||||
.cm-s-tiddlywiki .CodeMirror-activeline-background, .cm-s-tiddlywiki .CodeMirror-activeline-gutter .CodeMirror-linenumber { background: rgba(127,127,127,0.2); }
|
||||
.cm-s-tiddlywiki span.cm-matchhighlight { color: <<colour background>>; background-color: <<colour primary>>; font-weight: normal;}
|
||||
.cm-s-tiddlywiki .CodeMirror-widget {
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.cm-s-tiddlywiki .cm-header { color: #586e75; }
|
||||
.cm-s-tiddlywiki .cm-quote { color: #93a1a1; }
|
||||
|
||||
.cm-s-tiddlywiki .cm-keyword { color: #cb4b16; }
|
||||
.cm-s-tiddlywiki .cm-atom { color: #d33682; }
|
||||
.cm-s-tiddlywiki .cm-number { color: #d33682; }
|
||||
.cm-s-tiddlywiki .cm-def { color: #2aa198; }
|
||||
|
||||
.cm-s-tiddlywiki .cm-variable { color: #839496; }
|
||||
.cm-s-tiddlywiki .cm-variable-2 { color: #b58900; }
|
||||
.cm-s-tiddlywiki .cm-variable-3, .cm-s-tiddlywiki .cm-type { color: #6c71c4; }
|
||||
|
||||
.cm-s-tiddlywiki .cm-property { color: #2aa198; }
|
||||
.cm-s-tiddlywiki .cm-operator { color: #6c71c4; }
|
||||
|
||||
.cm-s-tiddlywiki .cm-comment { color: #586e75; font-style:italic; }
|
||||
|
||||
.cm-s-tiddlywiki .cm-string { color: #859900; }
|
||||
.cm-s-tiddlywiki .cm-string-2 { color: #b58900; }
|
||||
|
||||
.cm-s-tiddlywiki .cm-meta { color: #859900; }
|
||||
.cm-s-tiddlywiki .cm-qualifier { color: #b58900; }
|
||||
.cm-s-tiddlywiki .cm-builtin { color: #d33682; }
|
||||
@ -93,3 +96,7 @@ name: tiddlywiki
|
||||
color: #586e75;
|
||||
border-bottom: 1px dotted #dc322f;
|
||||
}
|
||||
.cm-s-tiddlywiki .CodeMirror-matchingbracket { color: #859900; }
|
||||
.cm-s-tiddlywiki .CodeMirror-nonmatchingbracket { color: #dc322f; }
|
||||
.cm-s-tiddlywiki .cm-searching { background: rgba(243, 155, 53, .3); outline: 1px solid #F39B35; }
|
||||
<<set-fat-cursor-background>>
|
||||
|
Loading…
Reference in New Issue
Block a user