Changeset View
Changeset View
Standalone View
Standalone View
data/syntax/sass.xml
- This file was added.
1 | <?xml version="1.0" encoding="UTF-8"?> | ||||
---|---|---|---|---|---|
2 | <!DOCTYPE language SYSTEM "language.dtd" | ||||
3 | [ | ||||
4 | <!-- https://www.w3.org/TR/CSS22/syndata.html#tokenization --> | ||||
5 | <!ENTITY nmstart "[_a-zA-Z]|(\\[0-9a-fA-F]{1,6})|(\\[^\n\r\f0-9a-fA-F])"> | ||||
6 | <!ENTITY nmchar "[_a-zA-Z0-9-]|(\\[0-9a-fA-F]{1,6})|(\\[^\n\r\f0-9a-fA-F])"> | ||||
7 | ]> | ||||
8 | | ||||
9 | <language name="SASS" version="1" kateversion="5.53" section="Markup" extensions="*.sass" indenter="cstyle" mimetype="text/css" author="Jonathan Poelen (jonathan.poelen@gmail.com)" license="MIT" priority="5"> | ||||
10 | | ||||
11 | <highlighting> | ||||
12 | <list name="properties"> | ||||
13 | <include>properties##SCSS</include> | ||||
14 | <include>sub-properties##SCSS</include> | ||||
15 | </list> | ||||
16 | <list name="special values"><include>special values##SCSS</include></list> | ||||
17 | <list name="value keywords"><include>value keywords##SCSS</include></list> | ||||
18 | <list name="values"><include>values##SCSS</include></list> | ||||
19 | <list name="colors"><include>colors##SCSS</include></list> | ||||
20 | <list name="functions"><include>functions##SCSS</include></list> | ||||
21 | <list name="medias"><include>medias##SCSS</include></list> | ||||
22 | <list name="pseudoelements"><include>pseudoelements##SCSS</include></list> | ||||
23 | <list name="pseudoclasses"><include>pseudoclasses##SCSS</include></list> | ||||
24 | <list name="pseudoclass-selector"><include>pseudoclass-selector##SCSS</include></list> | ||||
25 | <list name="pseudoclasses-@page"><include>pseudoclasses-@page##SCSS</include></list> | ||||
26 | <list name="at-rules"><include>at-rules##SCSS</include></list> | ||||
27 | <list name="nested at-rules"><include>nested at-rules##SCSS</include></list> | ||||
28 | <list name="inline and nested at-rules"><include>inline and nested at-rules##SCSS</include></list> | ||||
29 | <list name="@extend"><include>@extend##SCSS</include></list> | ||||
30 | <list name="@if"><include>@if##SCSS</include></list> | ||||
31 | <list name="@else"><include>@else##SCSS</include></list> | ||||
32 | <list name="@mixin"><include>@mixin##SCSS</include></list> | ||||
33 | <list name="@viewport"><include>@viewport##SCSS</include></list> | ||||
34 | <list name="@page"><include>@page##SCSS</include></list> | ||||
35 | <list name="@keyframes-@font-face"> | ||||
36 | <include>@font-face##SCSS</include> | ||||
37 | <include>@keyframes##SCSS</include> | ||||
38 | </list> | ||||
39 | <list name="media operators"><include>media operators##SCSS</include></list> | ||||
40 | <list name="operators"><include>operators##SCSS</include></list> | ||||
41 | <list name="annotations"><include>annotations##SCSS</include></list> | ||||
42 | | ||||
43 | <contexts> | ||||
44 | <context name="Base" attribute="Normal Text" lineEndContext="#stay"> | ||||
45 | <IncludeRules context="FindCommentsColumn0" /> | ||||
46 | <IncludeRules context="FindComments" /> | ||||
47 | <RegExpr attribute="Property" context="Rule" String="\s*[-_A-Za-z]+(/\*.*\*/)?\s*(?=:(\s|$))" lookAhead="true" column="0" /> | ||||
48 | <DetectSpaces /> | ||||
49 | <DetectChar attribute="At Rule" context="@mixin" char="=" firstNonSpace="true" /> | ||||
50 | <DetectChar attribute="At Rule" context="AtRule" char="+" firstNonSpace="true" /> | ||||
51 | <DetectChar attribute="At Rule" context="SelectAtRule" char="@" lookAhead="true" /> | ||||
52 | <!-- find selectors // .class #id :hover :nth-child(2n+1) [type="search"] --> | ||||
53 | <DetectChar attribute="Selector Attribute" context="SelectorAttr" char="[" /> | ||||
54 | <DetectChar attribute="Separator Symbol" context="#stay" char="," /> | ||||
55 | <AnyChar attribute="Operator" context="#stay" String="&*>+~|" /> | ||||
56 | <RegExpr attribute="Selector Pseudo" context="SelectorPseudo" String=":(?=[a-z:])" /> | ||||
57 | <RegExpr attribute="Selector Id" context="#stay" String="#[-]?(&nmstart;)(&nmchar;)*" /> | ||||
58 | <RegExpr attribute="Selector Class" context="#stay" String="\.([a-zA-Z0-9\-_]|[\x80-\xFF]|\\[0-9A-Fa-f]{1,6})*" /> | ||||
59 | <RegExpr attribute="Placeholder Selector" context="#stay" String="%[_a-zA-Z][_a-zA-Z\-]*" /> | ||||
60 | <RegExpr attribute="Selector Tag" context="#stay" String="[-]?(&nmstart;)(&nmchar;)*(?=\s|:?[#.&[*>+~|,]|:[a-z:])" /> | ||||
61 | <RegExpr attribute="Variable" context="VariableDefine" String="\$[a-zA-Z0-9\-_]+(?=\s*:)" /> | ||||
62 | <Detect2Chars attribute="Interpolation" context="Interpolation" char="#" char1="{" /> | ||||
63 | <DetectChar attribute="Normal Text" context="Rule" char=":" lookAhead="true" /> | ||||
64 | </context> | ||||
65 | | ||||
66 | <!-- same as SCSS --> | ||||
67 | <context name="FindSelector" attribute="Normal Text" lineEndContext="#stay"> | ||||
68 | <AnyChar attribute="Error" context="#stay" String=",&" /> | ||||
69 | <AnyChar attribute="Operator" context="#stay" String="*>+~|" /> | ||||
70 | <!-- find selectors // .class #id :hover :nth-child(2n+1) [type="search"] --> | ||||
71 | <DetectChar attribute="Selector Pseudo" context="SelectorPseudo" char=":" /> | ||||
72 | <DetectChar attribute="Selector Attribute" context="SelectorAttr" char="[" /> | ||||
73 | <IncludeRules context="FindComments" /> | ||||
74 | <RegExpr attribute="Selector Id" context="#stay" String="#[-]?(&nmstart;)(&nmchar;)*" /> | ||||
75 | <RegExpr attribute="Selector Class" context="#stay" String="\.([a-zA-Z0-9\-_]|[\x80-\xFF]|\\[0-9A-Fa-f]{1,6})*" /> | ||||
76 | <RegExpr attribute="Placeholder Selector" context="#stay" String="%[_a-zA-Z][_a-zA-Z\-]*" /> | ||||
77 | <RegExpr attribute="Selector Tag" context="#stay" String="[-]?(&nmstart;)(&nmchar;)*" /> | ||||
78 | <Detect2Chars attribute="Interpolation" context="Interpolation" char="#" char1="{" /> | ||||
79 | </context> | ||||
80 | | ||||
81 | <!-- same as SCSS --> | ||||
82 | <context name="VariableDefine" attribute="Normal Text" lineEndContext="#pop"> | ||||
83 | <DetectChar attribute="Normal Text" context="RuleParameters" char=":" /> | ||||
84 | </context> | ||||
85 | | ||||
86 | <context name="Interpolation" attribute="Normal Text" lineEndContext="#pop"> | ||||
87 | <DetectSpaces /> | ||||
88 | <DetectChar attribute="Interpolation" context="#pop" char="}" /> | ||||
89 | <IncludeRules context="FindStrings" /> | ||||
90 | <IncludeRules context="FindFunctions" /> | ||||
91 | <IncludeRules context="FindValues" /> | ||||
92 | <!-- auto-completion only --> | ||||
93 | <keyword attribute="Normal Text" context="#stay" String="functions" /> | ||||
94 | </context> | ||||
95 | | ||||
96 | | ||||
97 | <!-- find functions // rgba(255,255,255,0.75) --> | ||||
98 | <!-- same as SCSS --> | ||||
99 | <context name="FindFunctions" attribute="Normal Text" lineEndContext="#stay"> | ||||
100 | <RegExpr attribute="Function" context="Function" String="[a-z\-]{2,}\(" lookAhead="true" /> | ||||
101 | </context> | ||||
102 | | ||||
103 | <!-- find values // 10px 12pt 2.5em 1rem 75% #ffcc99 red solid --> | ||||
104 | <!-- same as SCSS --> | ||||
105 | <context name="FindValues" attribute="Normal Text" lineEndContext="#stay"> | ||||
106 | <DetectChar attribute="Annotation" context="Annotation" char="!" /> | ||||
107 | <keyword attribute="Operator" context="#stay" String="operators" /> | ||||
108 | <keyword attribute="Value Keyword" context="#stay" String="value keywords" /> | ||||
109 | <keyword attribute="Value" context="#stay" String="values" /> | ||||
110 | <keyword attribute="Color" context="#stay" String="colors" /> | ||||
111 | <RegExpr attribute="Number" context="FindUnits" String="([0-9]+(\.[0-9]+)?|\.[0-9]+)([eE][+-]?[0-9]+)?" /> | ||||
112 | <RegExpr attribute="Color" context="#stay" String="#([0-9A-Fa-f]{3,4}){1,2}\b" /> | ||||
113 | <RegExpr attribute="Variable" context="#stay" String="\$[a-zA-Z0-9\-_]+" /> | ||||
114 | <keyword attribute="Value Keyword" context="#stay" String="special values" /> | ||||
115 | <RegExpr attribute="Normal Text" context="#stay" String="[-]?(&nmstart;)(&nmchar;)*" /> | ||||
116 | <AnyChar attribute="Operator" context="#stay" String="*/+%-" /> | ||||
117 | <Detect2Chars attribute="Interpolation" context="Interpolation" char="#" char1="{" /> | ||||
118 | </context> | ||||
119 | | ||||
120 | <!-- same as SCSS --> | ||||
121 | <context name="Annotation" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop"> | ||||
122 | <keyword attribute="Annotation" context="#pop" String="annotations" /> | ||||
123 | </context> | ||||
124 | | ||||
125 | <!-- same as SCSS --> | ||||
126 | <context name="FindUnits" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop"> | ||||
127 | <RegExpr attribute="Unit" context="#pop" String="(%|(em|ex|cap|ch|ic|rem|lh|rlh|vw|vh|vi|vb|vmin|vmax|cm|mm|Q|in|pc|pt|px|deg|rad|grad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx|x)\b)" /> | ||||
128 | </context> | ||||
129 | | ||||
130 | <!-- find strings // "some words" 'some words' --> | ||||
131 | <!-- same as SCSS --> | ||||
132 | <context name="FindStrings" attribute="Normal Text" lineEndContext="#stay"> | ||||
133 | <DetectChar attribute="String" context="StringDQ" char=""" /> | ||||
134 | <DetectChar attribute="String" context="StringSQ" char="'" /> | ||||
135 | </context> | ||||
136 | | ||||
137 | <!-- find comments // and /* at the beginning of line --> | ||||
138 | <context name="FindCommentsColumn0" attribute="Comment" lineEndContext="#stay"> | ||||
139 | <!-- (\s*)(?=/[*/]) is not selected when the match is empty --> | ||||
140 | <RegExpr attribute="Normal Text" context="Comment" String="(\s+)(?=/[*/])" dynamic="true" column="0" /> | ||||
141 | <RegExpr attribute="Comment" context="Comment" String="()/[*/]" dynamic="true" column="0" /> | ||||
142 | </context> | ||||
143 | | ||||
144 | <!-- find comments // and /* --> | ||||
145 | <context name="FindComments" attribute="Comment" lineEndContext="#stay"> | ||||
146 | <Detect2Chars attribute="Comment" context="IsInlineComment" char="/" char1="/" /> | ||||
147 | <Detect2Chars attribute="Comment" context="IsInlineComment2" char="/" char1="*" /> | ||||
148 | </context> | ||||
149 | | ||||
150 | <context name="Comment" attribute="Comment" lineEndContext="#stay" dynamic="true" fallthrough="true" fallthroughContext="IsInlineComment"> | ||||
151 | <RegExpr attribute="Comment" context="IsInlineComment" String="%1\s|\s*$" dynamic="true" column="0" /> | ||||
152 | <DetectSpaces attribute="Normal Text" context="#pop" lookAhead="true" column="0" /> | ||||
153 | <RegExpr attribute="Comment" context="#pop" String="." lookAhead="true" column="0"/> | ||||
154 | </context> | ||||
155 | | ||||
156 | <context name="IsInlineComment" attribute="Comment" lineEndContext="#pop"> | ||||
157 | <DetectSpaces /> | ||||
158 | <IncludeRules context="##Alerts" /> | ||||
159 | <DetectIdentifier /> | ||||
160 | </context> | ||||
161 | | ||||
162 | <context name="IsInlineComment2" attribute="Comment" lineEndContext="#pop"> | ||||
163 | <DetectSpaces /> | ||||
164 | <IncludeRules context="##Alerts" /> | ||||
165 | <DetectIdentifier /> | ||||
166 | <Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" /> | ||||
167 | </context> | ||||
168 | | ||||
169 | <context name="SelectAtRule" attribute="At Rule" lineEndContext="#pop"> | ||||
170 | <keyword attribute="At Rule" context="#pop!AtRule" String="nested at-rules" /> | ||||
171 | <keyword attribute="At Rule" context="#pop!AtRule" String="at-rules" /> | ||||
172 | <keyword attribute="At Rule" context="#pop!AtRule" String="inline and nested at-rules" /> | ||||
173 | <keyword attribute="At Rule" context="#pop!@extend" String="@extend" /> | ||||
174 | <keyword attribute="At Rule" context="#pop!@mixin" String="@mixin" /> | ||||
175 | <keyword attribute="At Rule" context="#pop!@keyframes-@font-face" String="@keyframes-@font-face" /> | ||||
176 | <keyword attribute="At Rule" context="#pop!@viewport" String="@viewport" /> | ||||
177 | <keyword attribute="At Rule" context="#pop!@if" String="@if" /> | ||||
178 | <keyword attribute="At Rule" context="#pop!@else" String="@else" /> | ||||
179 | <keyword attribute="At Rule" context="#pop!@page" String="@page" /> | ||||
180 | <RegExpr attribute="At Rule" context="#pop!AtRule" String="@[a-zA-Z0-9\-_]+\b" /> | ||||
181 | </context> | ||||
182 | | ||||
183 | <context name="@if" attribute="Normal Text" lineEndContext="#pop"> | ||||
184 | <DetectSpaces /> | ||||
185 | <IncludeRules context="FindComments" /> | ||||
186 | <IncludeRules context="FindStrings" /> | ||||
187 | <IncludeRules context="FindFunctions" /> | ||||
188 | <IncludeRules context="FindValues" /> | ||||
189 | <AnyChar attribute="Operator" context="#stay" String="=!<>" /> | ||||
190 | <!-- auto-completion only --> | ||||
191 | <keyword attribute="Normal Text" context="#stay" String="functions" /> | ||||
192 | </context> | ||||
193 | | ||||
194 | <context name="@else" attribute="Error" lineEndContext="#pop"> | ||||
195 | <DetectSpaces attribute="Normal Text" /> | ||||
196 | <IncludeRules context="FindComments" /> | ||||
197 | <WordDetect attribute="At Rule" context="#pop!@if" String="if" /> | ||||
198 | <DetectIdentifier attribute="Error" /> | ||||
199 | </context> | ||||
200 | | ||||
201 | <context name="@extend" attribute="Normal Text" lineEndContext="#pop"> | ||||
202 | <DetectSpaces /> | ||||
203 | <IncludeRules context="FindSelector" /> | ||||
204 | </context> | ||||
205 | | ||||
206 | <context name="@mixin" attribute="Normal Text" lineEndContext="#pop"> | ||||
207 | <DetectSpaces /> | ||||
208 | <IncludeRules context="FindComments" /> | ||||
209 | <RegExpr attribute="Function" context="MixinParameter" String="[a-zA-Z0-9\-_]+" /> | ||||
210 | </context> | ||||
211 | | ||||
212 | <context name="MixinParameter" attribute="Error" lineEndContext="#pop#pop"> | ||||
213 | <DetectSpaces attribute="Normal Text" /> | ||||
214 | <AnyChar attribute="Normal Text" context="#stay" String="()" /> | ||||
215 | <DetectChar attribute="Separator Symbol" context="#stay" char="," /> | ||||
216 | <IncludeRules context="FindComments" /> | ||||
217 | <RegExpr attribute="Variable" context="#stay" String="\$[a-zA-Z0-9\-_]+" /> | ||||
218 | <StringDetect attribute="Operator" context="#stay" String="..." /> | ||||
219 | </context> | ||||
220 | | ||||
221 | <context name="@keyframes-@font-face" attribute="Normal Text" lineEndContext="#pop"> | ||||
222 | <DetectSpaces /> | ||||
223 | <IncludeRules context="FindComments" /> | ||||
224 | </context> | ||||
225 | | ||||
226 | <context name="@viewport" attribute="Normal Text" lineEndContext="#pop"> | ||||
227 | <DetectSpaces /> | ||||
228 | <IncludeRules context="FindComments" /> | ||||
229 | <DetectChar attribute="Selector Pseudo" context="SelectorPseudo" char=":" /> | ||||
230 | </context> | ||||
231 | | ||||
232 | <context name="@page" attribute="Normal Text" lineEndContext="#pop"> | ||||
233 | <DetectSpaces /> | ||||
234 | <IncludeRules context="FindComments" /> | ||||
235 | <DetectChar attribute="Selector Pseudo" context="SelectorPseudo-@page" char=":" /> | ||||
236 | </context> | ||||
237 | | ||||
238 | <context name="SelectorPseudo-@page" attribute="Selector Pseudo" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop"> | ||||
239 | <keyword attribute="Selector Pseudo" context="#pop" String="pseudoclasses-@page" /> | ||||
240 | <RegExpr attribute="Selector Pseudo" context="#pop" String="[-a-zA-Z][-a-zA-Z0-9]*" /> | ||||
241 | </context> | ||||
242 | | ||||
243 | <context name="AtRule" attribute="Normal Text" lineEndContext="#pop"> | ||||
244 | <DetectSpaces /> | ||||
245 | <DetectChar attribute="Operator" context="#stay" char="&" /> | ||||
246 | <IncludeRules context="FindComments" /> | ||||
247 | <IncludeRules context="FindStrings" /> | ||||
248 | <IncludeRules context="FindFunctions" /> | ||||
249 | <keyword attribute="Keyword" context="#stay" String="media operators" /> | ||||
250 | <RegExpr attribute="Property" context="#stay" String="[A-Za-z_-]+(?=\s*:)" /> | ||||
251 | <keyword attribute="Value" context="#stay" String="medias" /> | ||||
252 | <IncludeRules context="FindValues" /> | ||||
253 | <!-- auto-completion only --> | ||||
254 | <keyword attribute="Normal Text" context="#stay" String="functions" /> | ||||
255 | </context> | ||||
256 | | ||||
257 | <!-- same as SCSS --> | ||||
258 | <context name="SelectorAttr" attribute="Selector Attribute" lineEndContext="#pop"> | ||||
259 | <DetectChar attribute="Selector Attribute" context="#pop" char="]" /> | ||||
260 | <IncludeRules context="FindStrings" /> | ||||
261 | <DetectChar attribute="Operator" context="SelectorAttrValue" char="=" /> | ||||
262 | <Detect2Chars attribute="Operator" context="SelectorAttrValue" char="~" char1="=" /> | ||||
263 | <Detect2Chars attribute="Operator" context="SelectorAttrValue" char="^" char1="=" /> | ||||
264 | <Detect2Chars attribute="Operator" context="SelectorAttrValue" char="$" char1="=" /> | ||||
265 | <Detect2Chars attribute="Operator" context="SelectorAttrValue" char="*" char1="=" /> | ||||
266 | <Detect2Chars attribute="Operator" context="SelectorAttrValue" char="|" char1="=" /> | ||||
267 | <DetectIdentifier /> | ||||
268 | </context> | ||||
269 | | ||||
270 | <!-- same as SCSS --> | ||||
271 | <context name="SelectorAttrValue" attribute="String" lineEndContext="#pop#pop"> | ||||
272 | <DetectChar attribute="Selector Attribute" context="#pop#pop" char="]" /> | ||||
273 | <DetectIdentifier /> | ||||
274 | </context> | ||||
275 | | ||||
276 | <!-- same as SCSS --> | ||||
277 | <context name="SelectorPseudo" attribute="Selector Pseudo" lineEndContext="#pop"> | ||||
278 | <DetectChar attribute="Selector Pseudo" context="SelectorPseudoElements" char=":" /> | ||||
279 | <keyword attribute="Selector Pseudo" context="SelectorPseudoValueSelector" String="pseudoclass-selector" /> | ||||
280 | <keyword attribute="Selector Pseudo" context="SelectorPseudoValue" String="pseudoclasses" /> | ||||
281 | <RegExpr attribute="Selector Pseudo" context="SelectorPseudoValue" String="[-a-zA-Z][-a-zA-Z0-9]*" /> | ||||
282 | </context> | ||||
283 | | ||||
284 | <!-- same as SCSS --> | ||||
285 | <context name="SelectorPseudoElements" attribute="Selector Pseudo" lineEndContext="#pop#pop"> | ||||
286 | <keyword attribute="Selector Pseudo" context="#pop!SelectorPseudoValue" String="pseudoelements" /> | ||||
287 | <RegExpr attribute="Selector Pseudo" context="#pop!SelectorPseudoValue" String="[-a-zA-Z][-a-zA-Z0-9]*" /> | ||||
288 | </context> | ||||
289 | | ||||
290 | <!-- same as SCSS --> | ||||
291 | <context name="SelectorPseudoValueSelector" attribute="Selector Pseudo" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="#pop#pop"> | ||||
292 | <DetectChar attribute="Selector Pseudo" context="SelectorPseudoValueCloseSelector" char="(" /> | ||||
293 | </context> | ||||
294 | | ||||
295 | <context name="SelectorPseudoValueCloseSelector" attribute="Normal Text" lineEndContext="#pop#pop#pop"> | ||||
296 | <DetectSpaces /> | ||||
297 | <DetectChar attribute="Selector Pseudo" context="#pop#pop#pop" char=")" /> | ||||
298 | <IncludeRules context="FindSelector" /> | ||||
299 | </context> | ||||
300 | | ||||
301 | <!-- same as SCSS --> | ||||
302 | <context name="SelectorPseudoValue" attribute="Selector Pseudo" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="#pop#pop"> | ||||
303 | <DetectChar attribute="Selector Pseudo" context="SelectorPseudoValueClose" char="(" /> | ||||
304 | </context> | ||||
305 | | ||||
306 | <!-- same as SCSS --> | ||||
307 | <context name="SelectorPseudoValueClose" attribute="Selector Pseudo" lineEndContext="#pop#pop#pop"> | ||||
308 | <DetectChar attribute="Selector Pseudo" context="#pop#pop#pop" char=")" /> | ||||
309 | <DetectIdentifier /> | ||||
310 | </context> | ||||
311 | | ||||
312 | <context name="Rule" attribute="Normal Text" lineEndContext="#pop"> | ||||
313 | <DetectSpaces /> | ||||
314 | <IncludeRules context="FindComments" /> | ||||
315 | <DetectChar attribute="Normal Text" context="RuleParameters" char=":" /> | ||||
316 | <Detect2Chars attribute="Variable" context="IsVariable" char="-" char1="-" /> | ||||
317 | <keyword attribute="Property" context="#stay" String="properties" /> | ||||
318 | <RegExpr attribute="Unknown Property" context="#stay" String="[^:]+" /> | ||||
319 | </context> | ||||
320 | | ||||
321 | <context name="IsVariable" attribute="Normal Text" lineEndContext="#pop"> | ||||
322 | <DetectChar attribute="Normal Text" context="#pop!RuleParameters" char=":" /> | ||||
323 | <RegExpr attribute="Variable" context="#stay" String="[^:/]+" /> | ||||
324 | <IncludeRules context="FindComments" /> | ||||
325 | </context> | ||||
326 | | ||||
327 | <context name="RuleParameters" attribute="Normal Text" lineEndContext="#pop#pop"> | ||||
328 | <DetectSpaces /> | ||||
329 | <!-- Jump out conditions --> | ||||
330 | <DetectChar attribute="Separator Symbol" context="#stay" char="," /> | ||||
331 | <IncludeRules context="FindComments" /> | ||||
332 | <IncludeRules context="FindStrings" /> | ||||
333 | <IncludeRules context="FindFunctions" /> | ||||
334 | <IncludeRules context="FindValues" /> | ||||
335 | <!-- auto-completion only --> | ||||
336 | <keyword attribute="Normal Text" context="#stay" String="functions" /> | ||||
337 | </context> | ||||
338 | | ||||
339 | <!-- same as SCSS --> | ||||
340 | <context name="Function" attribute="Normal Text" lineEndContext="#pop"> | ||||
341 | <DetectChar attribute="Function" context="FunctionParameters" char="(" /> | ||||
342 | <StringDetect attribute="Function" context="FunctionVar" String="var(" /> | ||||
343 | <StringDetect attribute="Function" context="FunctionUrl" String="url(" /> | ||||
344 | <StringDetect attribute="Function" context="FunctionCalc" String="calc(" /> | ||||
345 | <keyword attribute="Function" context="#stay" String="functions" /> | ||||
346 | <RegExpr attribute="Function" context="#stay" String="[-a-zA-Z][-a-zA-Z0-9]*" /> | ||||
347 | </context> | ||||
348 | | ||||
349 | <!-- same as SCSS --> | ||||
350 | <context name="FunctionVar" attribute="Variable" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="#pop!FunctionParameters"> | ||||
351 | <DetectSpaces /> | ||||
352 | <IncludeRules context="FindComments" /> | ||||
353 | <RegExpr attribute="Variable" context="#pop!FunctionParameters" String="--[^ \t\),]+" /> | ||||
354 | </context> | ||||
355 | | ||||
356 | <!-- same as SCSS --> | ||||
357 | <context name="FunctionCalc" attribute="Normal Text" lineEndContext="#pop#pop"> | ||||
358 | <DetectSpaces /> | ||||
359 | <DetectChar attribute="Function" context="#pop#pop" char=")" /> | ||||
360 | <IncludeRules context="Calc" /> | ||||
361 | </context> | ||||
362 | | ||||
363 | <!-- same as SCSS --> | ||||
364 | <context name="NestedCalc" attribute="Normal Text" lineEndContext="#pop#pop"> | ||||
365 | <DetectSpaces /> | ||||
366 | <DetectChar attribute="Normal Text" context="#pop" char=")" /> | ||||
367 | <IncludeRules context="Calc" /> | ||||
368 | </context> | ||||
369 | | ||||
370 | <!-- same as SCSS --> | ||||
371 | <context name="Calc" attribute="Normal Text" lineEndContext="#pop"> | ||||
372 | <DetectChar attribute="Separator Symbol" context="#stay" char="," /> | ||||
373 | <DetectChar attribute="Normal Text" context="NestedCalc" char="(" /> | ||||
374 | <IncludeRules context="FindComments" /> | ||||
375 | <IncludeRules context="FindStrings" /> | ||||
376 | <IncludeRules context="FindFunctions" /> | ||||
377 | <IncludeRules context="FindValues" /> | ||||
378 | <RegExpr attribute="Operator" context="#stay" String="[-](?=$|[ \t(,;])|[+](?=$|[^0-9)])|[/*]" /> | ||||
379 | <!-- auto-completion only --> | ||||
380 | <keyword attribute="Normal Text" context="#stay" String="functions" /> | ||||
381 | </context> | ||||
382 | | ||||
383 | <!-- same as SCSS --> | ||||
384 | <context name="FunctionUrl" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="UrlValue"> | ||||
385 | <DetectSpaces /> | ||||
386 | <IncludeRules context="FindStrings" /> | ||||
387 | <DetectChar attribute="Function" context="#pop#pop" char=")" /> | ||||
388 | </context> | ||||
389 | | ||||
390 | <!-- same as SCSS --> | ||||
391 | <context name="UrlValue" attribute="String" lineEndContext="#pop#pop#pop"> | ||||
392 | <DetectChar attribute="Function" context="#pop#pop#pop" char=")" /> | ||||
393 | </context> | ||||
394 | | ||||
395 | <!-- same as SCSS --> | ||||
396 | <context name="FunctionParameters" attribute="Normal Text" lineEndContext="#pop#pop"> | ||||
397 | <DetectSpaces /> | ||||
398 | <DetectChar attribute="Function" context="#pop#pop" char=")" /> | ||||
399 | <IncludeRules context="FindComments" /> | ||||
400 | <IncludeRules context="FindStrings" /> | ||||
401 | <IncludeRules context="FindFunctions" /> | ||||
402 | <IncludeRules context="FindValues" /> | ||||
403 | <DetectChar attribute="Separator Symbol" context="#stay" char="," /> | ||||
404 | <StringDetect attribute="Operator" String="..." /> | ||||
405 | </context> | ||||
406 | | ||||
407 | <!-- string contexts --> | ||||
408 | <!-- same as SCSS --> | ||||
409 | <context name="StringDQ" attribute="String" lineEndContext="#pop"> | ||||
410 | <DetectChar attribute="String" context="#pop" char=""" /> | ||||
411 | <IncludeRules context="InsideString" /> | ||||
412 | </context> | ||||
413 | | ||||
414 | <!-- same as SCSS --> | ||||
415 | <context name="StringSQ" attribute="String" lineEndContext="#pop"> | ||||
416 | <DetectChar attribute="String" context="#pop" char="'" /> | ||||
417 | <IncludeRules context="InsideString" /> | ||||
418 | </context> | ||||
419 | | ||||
420 | <!-- same as SCSS --> | ||||
421 | <context name="InsideString" attribute="String" lineEndContext="#stay"> | ||||
422 | <Detect2Chars attribute="Interpolation" context="Interpolation" char="#" char1="{" /> | ||||
423 | <RegExpr attribute="SpecialChar" context="#stay" String="\\([0-9A-Fa-f]{1,6}|.?)" /> | ||||
424 | <RegExpr attribute="String" context="#stay" String="\\?[^#"'\\]+" /> | ||||
425 | </context> | ||||
426 | | ||||
427 | </contexts> | ||||
428 | | ||||
429 | <itemDatas> | ||||
430 | <itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false"/> | ||||
431 | <itemData name="At Rule" defStyleNum="dsImport" spellChecking="false"/> | ||||
432 | <itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false"/> | ||||
433 | <itemData name="Property" defStyleNum="dsKeyword" spellChecking="false"/> | ||||
434 | <itemData name="Unknown Property" defStyleNum="dsNormal" spellChecking="false"/> | ||||
435 | <itemData name="String" defStyleNum="dsString"/> | ||||
436 | <itemData name="SpecialChar" defStyleNum="dsSpecialChar" spellChecking="false"/> | ||||
437 | <itemData name="Interpolation" defStyleNum="dsOperator" spellChecking="false"/> | ||||
438 | <itemData name="Operator" defStyleNum="dsOperator" spellChecking="false"/> | ||||
439 | <itemData name="Separator Symbol" defStyleNum="dsOperator" spellChecking="false"/> | ||||
440 | <itemData name="Value" defStyleNum="dsDecVal" spellChecking="false"/> | ||||
441 | <itemData name="Number" defStyleNum="dsDecVal" spellChecking="false"/> | ||||
442 | <itemData name="Value Keyword" defStyleNum="dsBuiltIn" spellChecking="false"/> | ||||
443 | <itemData name="Color" defStyleNum="dsConstant" spellChecking="false"/> | ||||
444 | <itemData name="Unit" defStyleNum="dsDataType" spellChecking="false"/> | ||||
445 | <itemData name="Variable" defStyleNum="dsVariable" spellChecking="false"/> | ||||
446 | <itemData name="Function" defStyleNum="dsFunction" spellChecking="false"/> | ||||
447 | <itemData name="Annotation" defStyleNum="dsAttribute" spellChecking="false"/> | ||||
448 | <itemData name="Selector Id" defStyleNum="dsPreprocessor" bold="1" spellChecking="false"/> | ||||
449 | <itemData name="Selector Class" defStyleNum="dsFunction" spellChecking="false"/> | ||||
450 | <itemData name="Selector Attribute" defStyleNum="dsExtension" spellChecking="false"/> | ||||
451 | <itemData name="Selector Pseudo" defStyleNum="dsInformation" italic="1" spellChecking="false"/> | ||||
452 | <itemData name="Selector Tag" defStyleNum="dsNormal" spellChecking="false"/> | ||||
453 | <itemData name="Placeholder Selector" defStyleNum="dsBuiltIn" spellChecking="false"/> | ||||
454 | <itemData name="Comment" defStyleNum="dsComment" /> | ||||
455 | <itemData name="Error" defStyleNum="dsError" spellChecking="false"/> | ||||
456 | </itemDatas> | ||||
457 | </highlighting> | ||||
458 | | ||||
459 | <general> | ||||
460 | <keywords casesensitive="0" weakDeliminator="-%@" /> | ||||
461 | <folding indentationsensitive="1" /> | ||||
462 | <comments> | ||||
463 | <comment name="singleLine" start="//" position="afterwhitespace"/> | ||||
464 | </comments> | ||||
465 | </general> | ||||
466 | | ||||
467 | </language> |