1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-16 14:54:51 +00:00
TiddlyWiki5/plugins/tiddlywiki/codemirror/styles.tid

101 lines
5.7 KiB
Plaintext
Raw Normal View History

2013-05-15 16:32:28 +00:00
title: $:/plugins/tiddlywiki/codemirror/styles
tags: [[$:/tags/Stylesheet]]
module-type: codemirror-theme
name: tiddlywiki
2013-05-15 16:32:28 +00:00
2020-12-04 19:14:59 +00:00
\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
\define set-selection-background-css(colour,colourA,colourB,tiddlerEditorBackground)
<$wikify name="tiddlerEditorBackground" text={{{ [[$tiddlerEditorBackground$]lowercase[]] }}}>
<$set name="backgroundColour" value=<<contrastcolour target:"""$colour$""" fallbackTarget:"""""" colourA:"""$colourA$""" colourB:"""$colourB$""">>>
<$set name="backgroundColour" value={{{ [<backgroundColour>lowercase[]match<tiddlerEditorBackground>then[]] ~[<backgroundColour>] }}}>
.cm-s-tiddlywiki div.CodeMirror-selected { background: <<backgroundColour>>; color: <<colour foreground>>; }
.cm-s-tiddlywiki.CodeMirror ::selection { background: <<backgroundColour>>; color: <<colour foreground>>; }
.cm-s-tiddlywiki .CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: <<backgroundColour>>; color: <<colour foreground>>; }
.cm-s-tiddlywiki .CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: <<backgroundColour>>; color: <<colour foreground>>; }
</$set>
</$set>
</$wikify>
\end
\define set-selection-background-colours(palette)
<$macrocall $name="set-selection-background-css" colour={{$palette$##foreground}} colourA={{{ [{$palette$##selection-background}!match[]!prefix[<<]!suffix[>>]] ~#073642 }}} colourB={{{ [{$palette$##selection-background}!match[]!prefix[<<]!suffix[>>]] ~#eee8d5 }}} tiddlerEditorBackground={{$palette$##tiddler-editor-background}}/>
\end
\define set-selection-background()
<$macrocall $name="set-selection-background-colours" palette={{$:/palette}}/>
\end
2020-12-04 19:14:59 +00:00
\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline macrocallblock
2013-05-15 16:32:28 +00:00
/* Make the editor resize to fit its content */
.CodeMirror {
height: auto;
border: 1px solid <<colour tiddler-editor-border>>;
line-height: 1.5;
CodeMirror 5.36.0 modularized (#3184) * v5.35.1 * codemirror 5.35.1 * v5.35.1 * v5.35.1 * v5.35.1 * v5.35.1 * v5.35.1 * adding search&replace and autocomplete * update version number * add jump-to-line.js required for search&replace * adding show-hint.js required by autocomplete * adding basic autocomplete for any word * adding autocomplete css * adding new files to tiddlywiki.files * forgot adding search.js * minify 'em all * Delete vim.js * Delete sublime.js * Delete emacs.js * Delete anyword-hint.js * Delete show-hint.css * Delete show-hint.js * Update config.tid * Update tiddlywiki.files * Update tiddlywiki.files * Update config.tid * Update config.tid * Update config.tid * Delete dialog.js * Delete dialog.css * Delete jump-to-line.js * Delete search.js * Delete searchcursor.js * Update tiddlywiki.files * Update tiddlywiki.files * Update tiddlywiki.files * add search-and-replace cm-addon as plugin * add autocomplete cm-addon as plugin * add fullscreen-editing cm-addon as plugin * add keymaps as plugins + cleanup * add highlighting modes as plugins * small update on usage.tid * moved multiplex.js to htmlembedded mode - the only one using it * config/CodeMirror update * how to disable line numbers * how to change CM theme * add closebrackets and closetags addons * packaging a base-addon * move meta.js from codemirror to base addon * inputStyle: textarea -> prevents contenteditable on mobile browsers, keeps focus when clicking toolbar buttons, prevents import on paste * default config no line numbers * temporary add panel plugin for demo * put base-plugin back to codemirror editor * searchcursor to searchnreplace plugin * bad copypasta mistake * another typo * stripped down meta.js + moved matchbrackets to closebrackets plugin * remove panel * change module-type to codemirro and make init "require" dynamic. * make config handling dynamic with sensible defaults * make cm settings translateable * delete multids. they will be replaced * add auto-config tiddlers * dynamically create config structure for CM * fix filename * change typo * kitchensink config, plus change plugin description for better sorting. * add matchBrackets config tiddler * RIP codeblock * removed install instructions from readme - codemirror usage tiddler still todo * control panel settings for cm base * add setting for auto-close tags * adding fontfamily settings and theme settings * change tags for settings from $:/tags/ControlPanel/Settings to $:/tags/ControlPanel/Settings/CodeMirror * more usage info * more usage info * update to v5.36.0 * ugly hack enables highlighting and tag-closing for vnd.tiddlywiki and x-tiddlywiki * disable auto-indent for vnd.tiddlywiki & x-tiddlywiki and add some hidden settings * remove engine.js hack * meta.js -> tw-meta.js * codemirror settings tab * rename tiddler to tw-meta.js * make editor font monospace or sans-serif - dropdown select * make editor font monospace or sans-serif - dropdown select * now using correct tiddler for editor font setting * better usage doc * make markdown-mode require tw-meta * add more themes info * add active-line highlighting option * mini usage change * add integer type to engine.js config-getter * blink rate config type string * correct engine.js * license for base-plugin, usage link in settings tab * codemirrordemo hellothere update * codemirrordemo hellothere update * Update license.tid * codemirror demo sidebarlayout, license * license headers to addon files * license formatting & forgot what year we have * license formatting & forgot what year we have & codemirror demo sitetitle sitesubtitle * more informations 'try-this-style' for codemirrordemo hellothere * codemirror demo sitetitle & cm fontfamily * hellothere * font-family setting must be editor-font-family, not code-font-family * add basic keyboard shortcuts table * shortcuts change to not interfere with toolbar shortcuts - needs testing - vim and emacs todo * formatting * controlpanel change keymap - default keymap is default * ctrl-T becomes Alt-T in default keymap * adjustments for codemirror demo * demo: hellothere - hint for sidebar keymap cheatsheet * toolbar focus fix + remove console log * engine.js cleanup * formatting * reverting focus fix * indenting engine.js * hoping that indenting gets better
2018-04-06 16:34:50 +00:00
font-family: {{$:/themes/tiddlywiki/vanilla/settings/editorfontfamily}};
font-size: {{$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize}};
2013-05-15 16:32:28 +00:00
}
.CodeMirror-scroll {
overflow-x: auto;
overflow-y: hidden;
}
.cm-s-tiddlywiki {
color-profile: sRGB;
rendering-intent: auto;
}
.cm-s-tiddlywiki.CodeMirror, .cm-s-tiddlywiki .CodeMirror-gutters { background-color: <<colour tiddler-editor-background>>; color: <<colour foreground>>; }
.cm-s-tiddlywiki .CodeMirror-gutters {background: <<colour tiddler-editor-background>>; border-right: 1px solid <<colour tiddler-editor-border>>;}
.cm-s-tiddlywiki .CodeMirror-linenumber {color: <<colour foreground>>;}
.cm-s-tiddlywiki .CodeMirror-cursor { border-left: 2px solid <<colour foreground>>; }
.cm-s-tiddlywiki span.cm-comment { color: #586e75; font-style:italic; font-weight:normal; }
2020-12-04 19:14:59 +00:00
.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 .CodeMirror-dialog { background: <<colour tiddler-background>>; }
.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; }
.cm-s-tiddlywiki .cm-bracket { color: #cb4b16; }
.cm-s-tiddlywiki .CodeMirror-matchingbracket { color: #859900; }
.cm-s-tiddlywiki .CodeMirror-nonmatchingbracket { color: #dc322f; }
.cm-s-tiddlywiki .cm-tag { color: #93a1a1; }
.cm-s-tiddlywiki .cm-attribute { color: #2aa198; }
.cm-s-tiddlywiki .cm-hr { color: transparent; border-top: 1px solid #586e75; display: block; }
.cm-s-tiddlywiki .cm-link { color: #93a1a1; cursor: pointer; }
.cm-s-tiddlywiki .cm-special { color: #6c71c4; }
.cm-s-tiddlywiki .cm-em { color: #999; text-decoration: underline; text-decoration-style: dotted; }
.cm-s-tiddlywiki .cm-error,
.cm-s-tiddlywiki .cm-invalidchar { color: #586e75; border-bottom: 1px dotted #dc322f; }
2020-12-04 19:14:59 +00:00
.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>>
<<set-selection-background>>