Debian Codegraph @

resources/codemirror.less

raw
1 @import 'mediawiki.skin.variables.less';
2
3 .cm-editor {
4 border: @border-width-base @border-style-base @border-color-subtle;
5
6 .cm-selectionBackground {
7 background: #d9d9d9;
8
9 @media screen {
10 html.skin-theme-clientpref-night & {
11 background: #222;
12 }
13 }
14
15 @media screen and ( prefers-color-scheme: dark ) {
16 html.skin-theme-clientpref-os & {
17 background: #222;
18 }
19 }
20 }
21
22 &.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground {
23 background: #d7d4f0;
24
25 @media screen {
26 html.skin-theme-clientpref-night & {
27 background: #233;
28 }
29 }
30
31 @media screen and ( prefers-color-scheme: dark ) {
32 html.skin-theme-clientpref-os & {
33 background: #233;
34 }
35 }
36 }
37 }
38
39 .cm-matchingBracket,
40 .cm-focused .cm-matchingBracket {
41 background-color: #eee;
42 box-shadow: inset 0 0 1px 1px #999;
43 font-weight: bold;
44 }
45
46 .cm-editor .cm-specialChar {
47 color: @color-destructive--hover;
48 }
49
50 .cm-special-char-nbsp {
51 color: @color-placeholder;
52 }
53
54 .cm-tooltip-fold {
55 cursor: @cursor-base--hover;
56 line-height: 1.2;
57 padding: 0 1px;
58 }
59
60 .cm-editor .cm-foldPlaceholder {
61 background-color: @background-color-interactive;
62 border-color: @border-color-subtle;
63 color: @color-base;
64 }
65
66 .cm-bidi-isolate {
67 /* @noflip */
68 direction: ltr;
69 unicode-bidi: isolate;
70 }
71
72 .ext-codemirror-wrapper {
73 height: 100%;
74 }
75
76 // The various .cm-editor prefixed styles are required to have higher
77 // specificity than CodeMirror's default styles, which are set by JS.
78 .cm-editor .cm-gutters {
79 background-color: @background-color-interactive-subtle;
80 border-right-color: @border-color-subtle;
81 color: @color-subtle;
82 }
83
84 .cm-editor .cm-cursor {
85 border-left-color: @color-emphasized;
86 }
87
88 .cm-editor .cm-tooltip {
89 background-color: @background-color-neutral-subtle;
90 border-color: @border-color-base;
91 }
92
93 .cm-editor .cm-panels {
94 background-color: @background-color-neutral-subtle;
95 border-bottom: 0;
96 color: @color-base;
97 z-index: @z-index-above-content;
98
99 .cdx-button-group {
100 .cdx-button,
101 .cdx-toggle-button {
102 min-width: @min-width-toggle-switch;
103 }
104 }
105
106 .cm-mw-panel {
107 border-bottom: @border-style-base @border-width-base @border-color-subtle;
108 padding: @spacing-50;
109 }
110
111 .cm-mw-panel--text-input {
112 flex-basis: 0;
113 flex-grow: 1;
114 }
115
116 .cm-mw-panel--row {
117 align-items: center;
118 column-gap: @spacing-50;
119 display: flex;
120
121 &:not( :last-child ) {
122 margin-bottom: @spacing-50;
123 }
124 }
125
126 .cm-mw-panel--button {
127 margin-bottom: 0;
128 }
129
130 .cm-mw-panel--toggle-button.cdx-toggle-button--toggled-on {
131 &:enabled:active {
132 background-color: @color-progressive--active;
133 }
134
135 .cdx-icon {
136 background-color: @color-inverted;
137 }
138 }
139 }
140
141 .cm-mw-icon--match-case {
142 background-color: @color-base;
143 .cdx-mixin-css-icon( @cdx-icon-search-case-sensitive, @color-base, @size-icon-medium, true );
144 }
145
146 .cm-mw-icon--regexp {
147 background-color: @color-base;
148 .cdx-mixin-css-icon( @cdx-icon-search-regular-expression, @color-base, @size-icon-medium, true );
149 }
150
151 .cm-mw-icon--quotes {
152 background-color: @color-base;
153 .cdx-mixin-css-icon( @cdx-icon-quotes, @color-base, @size-icon-medium, true );
154 }
155
156 .cm-mw-icon--previous {
157 background-color: @color-base;
158 .cdx-mixin-css-icon( @cdx-icon-previous, @color-base, @size-icon-medium, true );
159 }
160
161 .cm-mw-icon--next {
162 background-color: @color-base;
163 .cdx-mixin-css-icon( @cdx-icon-next, @color-base, @size-icon-medium, true );
164 }