/
style.less
332 lines (287 loc) · 10.2 KB
/
style.less
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
// Copyright (c) 2014 Adobe Systems Incorporated. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// Style definitions are from
// https://github.com/chriskempson/tomorrow-theme/tree/master/Brackets
/*
* Brackets Default Theme
*
* Defines all the variables that one can configure in a theme. This should
* contain all variables / mixins for UI styling that we want to be able to
* change in a theme.
*
* Throughout the rest of the LESS files we should _only_ use color
* variable names that are on the LHS of the list below. So, if we
* need a new color for some UI element, we should add a variable
* in this file.
*/
/*
This LESS file contains code coloring configuration and the default colors specified
in this files have been defined globaly. Which means if a selector defined below is
being used in multiple document modes then all of those tokens will be colored using
the color value specified here. In order to control the number of unique colors used,
selectors are grouped together to distribute a limited number of colors across all
possible tokens in different document modes.
For example consider the following HTML snippet -
----------------------------------
<div>
My Sample content
</div>
----------------------------------
And the following CSS snippet -
----------------------------------
div {
color: #00f;
}
----------------------------------
In CC 2017, in both HTML and CSS doc modes 'div' has been assigned '.cm-tag' selector.
This implies that if in this LESS file the selector group containing '.cm-tag' is assigned
a color value '#446fbd', the tag name 'div' in HTML and the selector name 'div' in CSS will
have the same color. For a more detailed understanding of tokens and selectors being used in
different language modes, please go though the follwoing helpx page section -
(https://helpx.adobe.com/dreamweaver/using/customize-code-coloring.html#Understandingselectors)
However it's possible to specify different color values for these selectors targetting
different language modes. What needs to be done is identify the tokens what's being used
in a particular doc mode and target the corresponding selectors by nesting them under the
MODE selector.
For example let's take the snippets and case described above. If we want to override the
default color of tag only in HTML mode, we need to append this selector after the "custom" marker
in this LESS file.
----------------------------------------------
.HTML {
.cm-tag {
color: <custom color here>;
}
}
----------------------------------------------
This example can be expanded to include individual selectors or certain selectors grouped together.
These are the list of popular language modes along with the file extensions which they are associated with. Any of these modes can be used as parent selectors and then the individual token color can be
nested inside to make sure that we change only the targetted modes coloring.
->Groovy(groovy,gradle)
->Properties(ini,properties)
->CSS(css,css.erb)
->SCSS(scss,scss.erb)
->Stylus(styl)
->JavaScript(js,js.erb,jsm,_js)
->JSON(json)
->VBScript(vbs)
->VB(vb)
->XML(xml,wxs,wxl,wsdl,rss,atom,rdf,xslt,xsl,xul,xsd,xbl,mathml,config,plist,xaml)
->SVG(svg)
->HTML (html,htm,shtm,shtml,xhtml,cfm,cfml,cfc,dhtml,xht,tpl,twig,kit,jsp,aspx,ascx,asp,master,cshtml,vbhtml)
->EJS(ejs,dust)
->Embedded Ruby(erb,html.erb,htm.erb)
->JSX(jsx)
->C(c,h,i)
->C++(cc,cp,cpp,c++,cxx,hh,hpp,hxx,h++,ii,ino)
->C#(cs,asax,ashx)
->Java(java)
->Scala(scala,sbt)
->Dart(dart)
->PHP(php,php3,php4,php5,phtm,phtml,ctp)
->CoffeeScript(coffee,cf,cson,_coffee)
->Clojure(clj,cljs,cljx)
->Perl(pl,pm,t)
->Ruby(rb,ru,gemspec,rake)
->Python(py,pyw,wsgi,gyp,gypi)
->SASS(sass)
->Diff(diff,patch)
->Lua(lua)
->YAML(yaml,yml)
->SQL(sql)
->Haxe(hx)
->Bash(sh,command,bash)
->Haskell(hs)
->RDF Turtle(ttl)
->Markdown(md,markdown,mdown,mkdn)
->Markdown (GitHub)()
->LESS(less)
->Handlebars(hbs,handlebars)
*/
/* Define some variables used in multiple places */
/* 1. Background color for the code view */
@background: #24272e;
/* 2. Foreground color for the code view (Regular strings or text) */
@foreground: #9399a9;
/* Code Styling */
.CodeMirror, .CodeMirror-scroll {
background-color: @background;
color: @foreground;
}
/* NA */
.CodeMirror-focused .CodeMirror-activeline-background {
background: #b7b7b7;
}
/* NA */
.show-line-padding .CodeMirror-focused .CodeMirror-activeline-background {
box-shadow: inset 15px 0 0 0 #000;
}
/* NA */
.CodeMirror-focused .CodeMirror-activeline {
.CodeMirror-gutter-elt {
background: rgba(0, 0, 0, 0.2);
color: #fff;
}
/* NA */
.inline-widget .CodeMirror-gutter-elt {
color: #767676;
}
}
/* Color Theme Selectors & Color Values */
.cm-atom, .cm-string, .cm-string-2, .cm-hr {color: #9f5537;}
.cm-number, .cm-attribute, .cm-plus, .cm-qualifier {color: #28739f;}
.cm-def, .cm-property {color: #9399a9;}
.cm-variable, .cm-variable-2, .cm-variable-3, .cm-operator, .cm-meta, .cm-bracket {color: @foreground;}
.cm-comment {color: #4a5d71; font-style: normal;}
.cm-minus {color: #dc322f;}
.cm-header {color: #848877;}
.cm-link {color: #81d5ef; text-decoration: none;}
.cm-rangeinfo {color: #bee3ed;}
.cm-keyword, .cm-builtin, .cm-tag, .cm-quote {color: #15b8cf;}
/* HTML Specific Code Colouring */
.HTML {
}
/* PHP Specific Code Colouring */
.PHP {
.cm-meta { color: #E86868; }
.cm-keyword { color: #5494FB; }
.cm-operator { color: #15b8cf; }
.cm-variable-2 { color: #B79BF7; }
}
/* JavaScript Specific Code Colouring */
.JavaScript {
.cm-operator { color: #15b8cf; }
}
/* CSS, SCSS, LESS Specific Code Colouring */
.CSS, .SCSS, .LESS {
.cm-def {
color: #E86868;
}
}
/* Extra CSS */
.CodeMirror-searching {
background-color: #e2ce7e;
color: #222222 !important;
&.searching-current-match {
background-color: #f5a644;
color: #222222 !important;
}
}
.CodeMirror-cursor {
border-left: 1px solid #efefef !important;
}
.CodeMirror-gutters {
background-color: @background;
border-right: none;
}
/* sequence numbers */
.CodeMirror-linenumber {
color: #6a6a6a;
}
/* drag & Select text ,change focus */
.CodeMirror .CodeMirror-selected {
background: rgb(90, 90, 90);
}
/* drag & Select text*/
.CodeMirror-focused .CodeMirror-selected {
background: rgb(0, 85, 145);
}
/* drag & Select text ,change focus */
.CodeMirror .CodeMirror-selected-codefolding {
background: rgba(199, 199, 199, 0.3);
}
/* drag & Select text*/
.CodeMirror-focused .CodeMirror-selected-codefolding {
border: solid 1px rgba(157, 163, 180, 0.8) !important;
background: rgba(8, 31, 52, 0.5);
}
.CodeMirror-matchingbracket, .CodeMirror-matchingtag {
/* Ensure visibility against gray inline editor background */
background-color: #795d27;
color: #fff!important;
}
.CodeMirror-overwrite .CodeMirror-cursor {
border-left: none !important;
border-bottom: 1px solid #fff;
}
/*
CodeMirror's use of descendant selectors for certain styling causes problems when editors are
nested because, for items in the inner editor, the left-hand clause in the selector will now
match either the actual containing CodeMirror instance *OR* the outer "host" CodeMirror instance.
TODO (issue #324): We'll still have problems if editors can be nested more than one level deep,
or if any other descendant-selector-driven CM styles can differ between inner & outer editors
(potential problem areas include line wrap and coloring theme: basically, anything in codemirror.css
that uses a descandant selector where the CSS class name to the left of the space is something
other than a vanilla .CodeMirror)
*/
.CodeMirror {
.CodeMirror {
background: transparent;
}
.CodeMirror .CodeMirror-gutters {
background: transparent;
border-right: none;
}
.CodeMirror .CodeMirror-activeline-background {
background: transparent;
}
.CodeMirror .CodeMirror-activeline .CodeMirror-gutter-elt {
background: transparent;
color: #767676;
}
.CodeMirror-focused .CodeMirror-activeline-background {
background: #777;
}
.CodeMirror-focused .CodeMirror-activeline {
.CodeMirror-gutter-elt {
background: rgba(0, 0, 0, 0.2);
color: #fff;
}
}
}
/* dropdown icon - normal */
.CodeMirror-foldgutter-open:after {
color: #666;
}
/* dropdown icon - when closed */
.CodeMirror-foldgutter-folded:after {
color: #aaa;
}
/* dropdown icon - hover */
.CodeMirror.over-gutter, .CodeMirror-activeline {
.CodeMirror-foldgutter-open:after {
color: #888;
}
}
/* three dotted line box */
.CodeMirror-foldmarker {
border-color: #595b5c;
color: #bcbcbc;
background-color: #464748;
box-shadow: inset 0px 0px 1px 0px #bcbcbc;
}
/* Non-editor styling */
.image-view,
.not-editor {
background-color: @background;
}
.view-pane .image-view {
color: @foreground;
}
/* Custom code colors or overrides should start after this line */