mediawiki-skins-Citizen/skinStyles/extensions/CodeMirror/ext.CodeMirror.lib.less

230 lines
4.3 KiB
Plaintext
Raw Normal View History

2021-03-19 16:36:01 +00:00
/*
2021-08-25 19:08:28 +00:00
* Citizen
*
* SkinStyles for Extension:CodeMirror
* Module: ext.CodeMirror.lib
* Version: REL1_35 a326407
*
* Date: 2021-08-25
2021-03-19 16:36:01 +00:00
*/
@import '../../../resources/variables.less';
2021-08-25 19:08:28 +00:00
.CodeMirror {
// FIXME: This should be shared between other extensions
--color-syntax-red: @color-syntax-red;
--color-syntax-orange: @color-syntax-orange;
--color-syntax-yellow: @color-syntax-yellow;
--color-syntax-green: @color-syntax-green;
--color-syntax-cyan: @color-syntax-cyan;
--color-syntax-blue: @color-syntax-blue;
--color-syntax-paleblue: @color-syntax-paleblue;
--color-syntax-purple: @color-syntax-purple;
--color-syntax-brown: @color-syntax-brown;
--color-syntax-pink: @color-syntax-pink;
--color-syntax-violet: @color-syntax-violet;
--color-syntax-grey: @color-syntax-grey;
2021-08-25 19:08:28 +00:00
background-color: var( --color-surface-1 );
color: var( --color-base );
&-scrollbar,
&-gutter {
&-filler {
background-color: var( --color-surface-1 );
2021-03-19 16:36:01 +00:00
}
2021-08-25 19:08:28 +00:00
}
2021-08-25 20:31:10 +00:00
2021-08-25 19:08:28 +00:00
&-gutters {
2021-08-25 20:31:10 +00:00
border-color: transparent;
background-color: var( --color-surface-1 );
2021-08-25 19:08:28 +00:00
}
2021-03-19 16:36:01 +00:00
2021-08-25 19:08:28 +00:00
&-linenumber {
2021-08-25 20:31:10 +00:00
padding: 0 16px; // Give more space since there is no border and background
2021-08-25 19:08:28 +00:00
color: var( --color-base--subtle );
}
2021-03-19 16:36:01 +00:00
2021-08-25 19:08:28 +00:00
&-guttermarker {
color: var( --color-base );
&-subtle {
2021-03-19 16:36:01 +00:00
color: var( --color-base--subtle );
}
2021-08-25 19:08:28 +00:00
}
2021-08-11 19:22:41 +00:00
2021-08-25 19:08:28 +00:00
&-cursor {
border-left-color: var( --color-base--emphasized );
}
2021-08-11 19:22:41 +00:00
2021-08-25 19:08:28 +00:00
div.CodeMirror-secondarycursor {
border-left-color: var( --color-base );
}
2021-08-11 19:22:41 +00:00
2021-08-25 19:08:28 +00:00
&-ruler {
border-left-color: var( --border-color-base );
}
}
2021-08-11 19:22:41 +00:00
2021-08-25 19:08:28 +00:00
// Default theme
.cm {
&-s-default {
.cm {
&-header {
color: var( --color-syntax-blue );
2021-08-25 19:08:28 +00:00
}
&-quote {
color: var( --color-syntax-green );
2021-08-25 19:08:28 +00:00
}
&-keyword {
color: var( --color-syntax-purple );
2021-08-25 19:08:28 +00:00
}
&-atom {
color: var( --color-syntax-pink );
2021-08-25 19:08:28 +00:00
}
&-number {
color: var( --color-syntax-orange );
2021-08-25 19:08:28 +00:00
}
&-def {
color: var( --color-syntax-blue );
2021-08-25 19:08:28 +00:00
}
&-variable {
color: var( --color-syntax-red );
2021-08-25 19:08:28 +00:00
}
&-variable-2 {
color: var( --color-base );
}
&-variable-3,
&-type {
color: var( --color-syntax-yellow );
2021-08-25 19:08:28 +00:00
}
&-comment {
color: var( --color-syntax-gray );
2021-08-25 19:08:28 +00:00
}
&-string {
color: var( --color-syntax-green );
2021-08-25 19:08:28 +00:00
}
&-string-2 {
color: var( --color-syntax-red );
2021-08-25 19:08:28 +00:00
}
&-meta {
color: var( --color-syntax-yellow );
2021-08-25 19:08:28 +00:00
}
&-qualifier {
color: var( --color-syntax-yellow );
2021-08-25 19:08:28 +00:00
}
&-builtin {
color: var( --color-syntax-yellow );
2021-08-25 19:08:28 +00:00
}
&-bracket {
color: var( --color-syntax-grey );
2021-08-25 19:08:28 +00:00
}
&-tag {
color: var( --color-syntax-pink );
2021-08-25 19:08:28 +00:00
}
&-attribute {
color: var( --color-syntax-purple );
2021-08-25 19:08:28 +00:00
}
&-hr {
color: var( --color-syntax-blue );
2021-08-25 19:08:28 +00:00
}
&-link {
color: var( --color-syntax-blue );
2021-08-25 19:08:28 +00:00
}
&-error {
color: var( --color-destructive );
}
&-property {
color: var( --color-syntax-purple );
2021-08-25 19:08:28 +00:00
}
&-operator {
color: var( --color-syntax-cyan );
2021-08-25 19:08:28 +00:00
}
&-punctuation {
color: var( --color-syntax-cyan );
2021-08-25 19:08:28 +00:00
}
2021-08-11 19:22:41 +00:00
}
2021-08-25 19:08:28 +00:00
&-negative {
color: var( --color-destructive );
2021-08-11 19:22:41 +00:00
}
2021-08-25 19:08:28 +00:00
&-positive {
color: var( --color-success );
2021-08-11 19:22:41 +00:00
}
2021-08-25 19:08:28 +00:00
&-invalidchar {
color: var( --color-destructive );
2021-08-11 19:22:41 +00:00
}
2021-08-25 19:08:28 +00:00
}
2021-08-11 19:22:41 +00:00
2021-08-25 19:08:28 +00:00
&-composing {
border-bottom-color: var( --border-color-base );
}
2021-08-11 19:22:41 +00:00
2021-08-25 19:08:28 +00:00
&-selected {
background: var( --background-color-primary--hover );
}
2021-08-11 19:22:41 +00:00
2021-08-25 19:08:28 +00:00
&-focused .CodeMirror-selected {
background: var( --background-color-primary--active );
}
2021-08-11 19:22:41 +00:00
2021-08-25 19:08:28 +00:00
&-line {
&::selection,
> span::selection,
> span > span::selection {
background: var( --background-color-primary--active );
2021-08-11 19:22:41 +00:00
}
2021-08-25 19:08:28 +00:00
}
}
2021-08-11 19:22:41 +00:00
2021-08-25 19:08:28 +00:00
div.CodeMirror {
span.CodeMirror {
&-matchingbracket {
color: var( --color-success );
2021-08-11 19:22:41 +00:00
}
2021-08-25 19:08:28 +00:00
&-nonmatchingbracket {
color: var( --color-destructive );
2021-08-11 19:22:41 +00:00
}
2021-03-19 16:36:01 +00:00
}
}
2021-08-11 19:22:41 +00:00
.skin-citizen-dark .CodeMirror {
// FIXME: This should be shared between other extensions
--color-syntax-red: @color-syntax-red-dark;
--color-syntax-orange: @color-syntax-orange-dark;
--color-syntax-yellow: @color-syntax-yellow-dark;
--color-syntax-green: @color-syntax-green-dark;
--color-syntax-cyan: @color-syntax-cyan-dark;
--color-syntax-blue: @color-syntax-blue-dark;
--color-syntax-paleblue: @color-syntax-paleblue-dark;
--color-syntax-purple: @color-syntax-purple-dark;
--color-syntax-brown: @color-syntax-brown-dark;
--color-syntax-pink: @color-syntax-pink-dark;
--color-syntax-violet: @color-syntax-violet-dark;
2021-08-11 19:22:41 +00:00
}