| 1 |
{ |
| 2 |
"name": "stylus", |
| 3 |
"scopeName": "source.stylus", |
| 4 |
"fileTypes": ["styl", "stylus", "css.styl", "css.stylus"], |
| 5 |
"patterns": [ |
| 6 |
{ |
| 7 |
"include": "#comment" |
| 8 |
}, |
| 9 |
{ |
| 10 |
"include": "#at_rule" |
| 11 |
}, |
| 12 |
{ |
| 13 |
"include": "#language_keywords" |
| 14 |
}, |
| 15 |
{ |
| 16 |
"include": "#language_constants" |
| 17 |
}, |
| 18 |
{ |
| 19 |
"include": "#variable_declaration" |
| 20 |
}, |
| 21 |
{ |
| 22 |
"include": "#function" |
| 23 |
}, |
| 24 |
{ |
| 25 |
"include": "#selector" |
| 26 |
}, |
| 27 |
{ |
| 28 |
"include": "#declaration" |
| 29 |
}, |
| 30 |
{ |
| 31 |
"captures": { |
| 32 |
"1": { |
| 33 |
"name": "punctuation.section.property-list.begin.css" |
| 34 |
}, |
| 35 |
"2": { |
| 36 |
"name": "punctuation.section.property-list.end.css" |
| 37 |
} |
| 38 |
}, |
| 39 |
"match": "(\\{)(\\})", |
| 40 |
"name": "meta.brace.curly.css" |
| 41 |
}, |
| 42 |
{ |
| 43 |
"match": "\\{|\\}", |
| 44 |
"name": "meta.brace.curly.css" |
| 45 |
}, |
| 46 |
{ |
| 47 |
"include": "#numeric" |
| 48 |
}, |
| 49 |
{ |
| 50 |
"include": "#string" |
| 51 |
}, |
| 52 |
{ |
| 53 |
"include": "#operator" |
| 54 |
} |
| 55 |
], |
| 56 |
"repository": { |
| 57 |
"comment": { |
| 58 |
"patterns": [ |
| 59 |
{ |
| 60 |
"include": "#comment_block" |
| 61 |
}, |
| 62 |
{ |
| 63 |
"include": "#comment_line" |
| 64 |
} |
| 65 |
] |
| 66 |
}, |
| 67 |
"comment_block": { |
| 68 |
"begin": "/\\*", |
| 69 |
"beginCaptures": { |
| 70 |
"0": { |
| 71 |
"name": "punctuation.definition.comment.begin.css" |
| 72 |
} |
| 73 |
}, |
| 74 |
"end": "\\*/", |
| 75 |
"endCaptures": { |
| 76 |
"0": { |
| 77 |
"name": "punctuation.definition.comment.end.css" |
| 78 |
} |
| 79 |
}, |
| 80 |
"name": "comment.block.css" |
| 81 |
}, |
| 82 |
"comment_line": { |
| 83 |
"begin": "(^[ \\t]+)?(?=//)", |
| 84 |
"beginCaptures": { |
| 85 |
"1": { |
| 86 |
"name": "punctuation.whitespace.comment.leading.stylus" |
| 87 |
} |
| 88 |
}, |
| 89 |
"end": "(?!\\G)", |
| 90 |
"patterns": [ |
| 91 |
{ |
| 92 |
"begin": "//", |
| 93 |
"beginCaptures": { |
| 94 |
"0": { |
| 95 |
"name": "punctuation.definition.comment.stylus" |
| 96 |
} |
| 97 |
}, |
| 98 |
"end": "(?=\\n)", |
| 99 |
"name": "comment.line.double-slash.stylus" |
| 100 |
} |
| 101 |
] |
| 102 |
}, |
| 103 |
"selector": { |
| 104 |
"patterns": [ |
| 105 |
{ |
| 106 |
"match": "(?:(?=\\w)(?<![\\w-]))(a|abbr|acronym|address|area|article|aside|audio|b|base|bdi|bdo|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|data|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|embed|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|main|map|mark|math|menu|menuitem|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|picture|pre|progress|q|rb|rp|rt|rtc|ruby|s|samp|script|section|select|small|source|span|strike|strong|style|sub|summary|sup|svg|table|tbody|td|template|textarea|tfoot|th|thead|time|title|tr|track|tt|u|ul|var|video|wbr)(?:(?<=\\w)(?![\\w-]))", |
| 107 |
"name": "entity.name.tag.css" |
| 108 |
}, |
| 109 |
{ |
| 110 |
"match": "(?:(?=\\w)(?<![\\w-]))(vkern|view|use|tspan|tref|title|textPath|text|symbol|switch|svg|style|stop|set|script|rect|radialGradient|polyline|polygon|pattern|path|mpath|missing-glyph|metadata|mask|marker|linearGradient|line|image|hkern|glyphRef|glyph|g|foreignObject|font-face-uri|font-face-src|font-face-name|font-face-format|font-face|font|filter|feTurbulence|feTile|feSpotLight|feSpecularLighting|fePointLight|feOffset|feMorphology|feMergeNode|feMerge|feImage|feGaussianBlur|feFuncR|feFuncG|feFuncB|feFuncA|feFlood|feDistantLight|feDisplacementMap|feDiffuseLighting|feConvolveMatrix|feComposite|feComponentTransfer|feColorMatrix|feBlend|ellipse|desc|defs|cursor|color-profile|clipPath|circle|animateTransform|animateMotion|animateColor|animate|altGlyphItem|altGlyphDef|altGlyph|a)(?:(?<=\\w)(?![\\w-]))", |
| 111 |
"name": "entity.name.tag.svg.css" |
| 112 |
}, |
| 113 |
{ |
| 114 |
"match": "\\s*(\\,)\\s*", |
| 115 |
"name": "meta.selector.stylus" |
| 116 |
}, |
| 117 |
{ |
| 118 |
"match": "\\*", |
| 119 |
"name": "meta.selector.stylus" |
| 120 |
}, |
| 121 |
{ |
| 122 |
"match": "\\s*(\\&)([a-zA-Z0-9_-]+)\\s*", |
| 123 |
"captures": { |
| 124 |
"2": { |
| 125 |
"name": "entity.other.attribute-name.parent-selector-suffix.stylus" |
| 126 |
} |
| 127 |
}, |
| 128 |
"name": "meta.selector.stylus" |
| 129 |
}, |
| 130 |
{ |
| 131 |
"match": "\\s*(\\&)\\s*", |
| 132 |
"name": "meta.selector.stylus" |
| 133 |
}, |
| 134 |
{ |
| 135 |
"captures": { |
| 136 |
"1": { |
| 137 |
"name": "punctuation.definition.entity.css" |
| 138 |
} |
| 139 |
}, |
| 140 |
"match": "(\\.)[a-zA-Z0-9_-]+", |
| 141 |
"name": "entity.other.attribute-name.class.css" |
| 142 |
}, |
| 143 |
{ |
| 144 |
"captures": { |
| 145 |
"1": { |
| 146 |
"name": "punctuation.definition.entity.css" |
| 147 |
} |
| 148 |
}, |
| 149 |
"match": "(#)[a-zA-Z][a-zA-Z0-9_-]*", |
| 150 |
"name": "entity.other.attribute-name.id.css" |
| 151 |
}, |
| 152 |
{ |
| 153 |
"captures": { |
| 154 |
"1": { |
| 155 |
"name": "punctuation.definition.entity.css" |
| 156 |
} |
| 157 |
}, |
| 158 |
"match": "(:+)(after|before|content|first-letter|first-line|host|(-(moz|webkit|ms)-)?selection)\\b", |
| 159 |
"name": "entity.other.attribute-name.pseudo-element.css" |
| 160 |
}, |
| 161 |
{ |
| 162 |
"captures": { |
| 163 |
"1": { |
| 164 |
"name": "punctuation.definition.entity.css" |
| 165 |
} |
| 166 |
}, |
| 167 |
"match": "(:)((first|last)-child|(first|last|only)-of-type|empty|root|target|first|left|right)\\b", |
| 168 |
"name": "entity.other.attribute-name.pseudo-class.css" |
| 169 |
}, |
| 170 |
{ |
| 171 |
"captures": { |
| 172 |
"1": { |
| 173 |
"name": "punctuation.definition.entity.css" |
| 174 |
} |
| 175 |
}, |
| 176 |
"match": "(:)(checked|enabled|default|disabled|indeterminate|invalid|optional|required|valid)\\b", |
| 177 |
"name": "entity.other.attribute-name.pseudo-class.ui-state.css" |
| 178 |
}, |
| 179 |
{ |
| 180 |
"begin": "((:)not)(\\()", |
| 181 |
"beginCaptures": { |
| 182 |
"1": { |
| 183 |
"name": "entity.other.attribute-name.pseudo-class.css" |
| 184 |
}, |
| 185 |
"2": { |
| 186 |
"name": "punctuation.definition.entity.css" |
| 187 |
}, |
| 188 |
"3": { |
| 189 |
"name": "punctuation.section.function.css" |
| 190 |
} |
| 191 |
}, |
| 192 |
"end": "\\)", |
| 193 |
"endCaptures": { |
| 194 |
"0": { |
| 195 |
"name": "punctuation.section.function.css" |
| 196 |
} |
| 197 |
}, |
| 198 |
"patterns": [ |
| 199 |
{ |
| 200 |
"include": "#selector" |
| 201 |
} |
| 202 |
] |
| 203 |
}, |
| 204 |
{ |
| 205 |
"captures": { |
| 206 |
"1": { |
| 207 |
"name": "entity.other.attribute-name.pseudo-class.css" |
| 208 |
}, |
| 209 |
"2": { |
| 210 |
"name": "punctuation.definition.entity.css" |
| 211 |
}, |
| 212 |
"3": { |
| 213 |
"name": "punctuation.section.function.css" |
| 214 |
}, |
| 215 |
"4": { |
| 216 |
"name": "constant.numeric.css" |
| 217 |
}, |
| 218 |
"5": { |
| 219 |
"name": "punctuation.section.function.css" |
| 220 |
} |
| 221 |
}, |
| 222 |
"match": "((:)nth-(?:(?:last-)?child|(?:last-)?of-type))(\\()(\\-?(?:\\d+n?|n)(?:\\+\\d+)?|even|odd)(\\))" |
| 223 |
}, |
| 224 |
{ |
| 225 |
"match": "((:)dir)\\s*(?:(\\()(ltr|rtl)?(\\)))?", |
| 226 |
"captures": { |
| 227 |
"1": { |
| 228 |
"name": "entity.other.attribute-name.pseudo-class.css" |
| 229 |
}, |
| 230 |
"2": { |
| 231 |
"name": "puncutation.definition.entity.css" |
| 232 |
}, |
| 233 |
"3": { |
| 234 |
"name": "punctuation.section.function.css" |
| 235 |
}, |
| 236 |
"4": { |
| 237 |
"name": "constant.language.css" |
| 238 |
}, |
| 239 |
"5": { |
| 240 |
"name": "punctuation.section.function.css" |
| 241 |
} |
| 242 |
} |
| 243 |
}, |
| 244 |
{ |
| 245 |
"match": "((:)lang)\\s*(?:(\\()(\\w+(-\\w+)?)?(\\)))?", |
| 246 |
"captures": { |
| 247 |
"1": { |
| 248 |
"name": "entity.other.attribute-name.pseudo-class.css" |
| 249 |
}, |
| 250 |
"2": { |
| 251 |
"name": "puncutation.definition.entity.css" |
| 252 |
}, |
| 253 |
"3": { |
| 254 |
"name": "punctuation.section.function.css" |
| 255 |
}, |
| 256 |
"4": { |
| 257 |
"name": "constant.language.css" |
| 258 |
}, |
| 259 |
"6": { |
| 260 |
"name": "punctuation.section.function.css" |
| 261 |
} |
| 262 |
} |
| 263 |
}, |
| 264 |
{ |
| 265 |
"captures": { |
| 266 |
"1": { |
| 267 |
"name": "punctuation.definition.entity.css" |
| 268 |
} |
| 269 |
}, |
| 270 |
"match": "(:)(active|hover|link|visited|focus)\\b", |
| 271 |
"name": "entity.other.attribute-name.pseudo-class.css" |
| 272 |
}, |
| 273 |
{ |
| 274 |
"captures": { |
| 275 |
"1": { |
| 276 |
"name": "punctuation.definition.entity.css" |
| 277 |
} |
| 278 |
}, |
| 279 |
"match": "(::)(shadow)\\b", |
| 280 |
"name": "entity.other.attribute-name.pseudo-class.css" |
| 281 |
}, |
| 282 |
{ |
| 283 |
"captures": { |
| 284 |
"1": { |
| 285 |
"name": "punctuation.definition.entity.css" |
| 286 |
}, |
| 287 |
"2": { |
| 288 |
"name": "entity.other.attribute-name.attribute.css" |
| 289 |
}, |
| 290 |
"3": { |
| 291 |
"name": "punctuation.separator.operator.css" |
| 292 |
}, |
| 293 |
"4": { |
| 294 |
"name": "string.unquoted.attribute-value.css" |
| 295 |
}, |
| 296 |
"5": { |
| 297 |
"name": "string.quoted.double.attribute-value.css" |
| 298 |
}, |
| 299 |
"6": { |
| 300 |
"name": "punctuation.definition.string.begin.css" |
| 301 |
}, |
| 302 |
"7": { |
| 303 |
"name": "punctuation.definition.string.end.css" |
| 304 |
}, |
| 305 |
"8": { |
| 306 |
"name": "punctuation.definition.entity.css" |
| 307 |
} |
| 308 |
}, |
| 309 |
"match": "(?i)(\\[)\\s*(-?[_a-z\\\\[[:^ascii:]]][_a-z0-9\\-\\\\[[:^ascii:]]]*)(?:\\s*([~|^$*]?=)\\s*(?:(-?[_a-z\\\\[[:^ascii:]]][_a-z0-9\\-\\\\[[:^ascii:]]]*)|((?>(['\"])(?:[^\\\\]|\\\\.)*?(\\6)))))?\\s*(\\])", |
| 310 |
"name": "meta.attribute-selector.css" |
| 311 |
}, |
| 312 |
{ |
| 313 |
"include": "#interpolation" |
| 314 |
}, |
| 315 |
{ |
| 316 |
"include": "#variable" |
| 317 |
} |
| 318 |
] |
| 319 |
}, |
| 320 |
"variable_declaration": { |
| 321 |
"begin": "^[^\\S\\n]*(\\$?[a-zA-Z_-][a-zA-Z0-9_-]*)[^\\S\\n]*(\\=|\\?\\=|\\:\\=)", |
| 322 |
"beginCaptures": { |
| 323 |
"1": { |
| 324 |
"name": "variable.stylus" |
| 325 |
}, |
| 326 |
"2": { |
| 327 |
"name": "keyword.operator.stylus" |
| 328 |
} |
| 329 |
}, |
| 330 |
"end": "(\\n)|(;)|(?=\\})", |
| 331 |
"endCaptures": { |
| 332 |
"2": { |
| 333 |
"name": "punctuation.terminator.rule.css" |
| 334 |
} |
| 335 |
}, |
| 336 |
"patterns": [ |
| 337 |
{ |
| 338 |
"include": "#property_values" |
| 339 |
} |
| 340 |
] |
| 341 |
}, |
| 342 |
"declaration": { |
| 343 |
"begin": "((?<=^)[^\\S\\n]+)|((?<=;)[^\\S\\n]*)|((?<=\\{)[^\\S\\n]*)", |
| 344 |
"end": "(?=\\n)|(;)|(?=\\})|(\\n)", |
| 345 |
"endCaptures": { |
| 346 |
"2": { |
| 347 |
"name": "punctuation.terminator.rule.css" |
| 348 |
} |
| 349 |
}, |
| 350 |
"name": "meta.property-list.css", |
| 351 |
"patterns": [ |
| 352 |
{ |
| 353 |
"match": "(?x) (?<![\\w-])\n--\n(?:[-a-zA-Z_] | [^\\x00-\\x7F]) # First letter\n(?:[-a-zA-Z0-9_] | [^\\x00-\\x7F] # Remainder of identifier\n |\\\\(?:[0-9a-fA-F]{1,6}|.)\n)*", |
| 354 |
"name": "variable.css" |
| 355 |
}, |
| 356 |
{ |
| 357 |
"include": "#language_keywords" |
| 358 |
}, |
| 359 |
{ |
| 360 |
"include": "#language_constants" |
| 361 |
}, |
| 362 |
{ |
| 363 |
"match": "(?:(?<=^)[^\\S\\n]+(\\n))" |
| 364 |
}, |
| 365 |
{ |
| 366 |
"match": "\\G\\s*(counter-reset|counter-increment)(?:(:)|[^\\S\\n])[^\\S\\n]*([a-zA-Z_-][a-zA-Z0-9_-]*)", |
| 367 |
"captures": { |
| 368 |
"1": { |
| 369 |
"name": "support.type.property-name.css" |
| 370 |
}, |
| 371 |
"2": { |
| 372 |
"name": "punctuation.separator.key-value.css" |
| 373 |
}, |
| 374 |
"3": { |
| 375 |
"name": "variable.section.css" |
| 376 |
} |
| 377 |
}, |
| 378 |
"name": "meta.property.counter.css" |
| 379 |
}, |
| 380 |
{ |
| 381 |
"begin": "\\G\\s*(filter)(?:(:)|[^\\S\\n])[^\\S\\n]*", |
| 382 |
"beginCaptures": { |
| 383 |
"1": { |
| 384 |
"name": "support.type.property-name.css" |
| 385 |
}, |
| 386 |
"2": { |
| 387 |
"name": "punctuation.separator.key-value.css" |
| 388 |
} |
| 389 |
}, |
| 390 |
"end": "(?=\\n|;|\\}|$)", |
| 391 |
"name": "meta.property.filter.css", |
| 392 |
"patterns": [ |
| 393 |
{ |
| 394 |
"include": "#function" |
| 395 |
}, |
| 396 |
{ |
| 397 |
"include": "#property_values" |
| 398 |
} |
| 399 |
] |
| 400 |
}, |
| 401 |
{ |
| 402 |
"include": "#property" |
| 403 |
}, |
| 404 |
{ |
| 405 |
"include": "#interpolation" |
| 406 |
}, |
| 407 |
{ |
| 408 |
"include": "$self" |
| 409 |
} |
| 410 |
] |
| 411 |
}, |
| 412 |
"property": { |
| 413 |
"begin": "(?x:\\G\\s*(?:\n (-webkit-[-A-Za-z]+|-moz-[-A-Za-z]+|-o-[-A-Za-z]+|-ms-[-A-Za-z]+|-khtml-[-A-Za-z]+|zoom|z-index|y|x|wrap|word-wrap|word-spacing|word-break|word|width|widows|white-space-collapse|white-space|white|weight|volume|voice-volume|voice-stress|voice-rate|voice-pitch-range|voice-pitch|voice-family|voice-duration|voice-balance|voice|visibility|vertical-align|variant|user-select|up|unicode-bidi|unicode-range|unicode|trim|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform|touch-action|top-width|top-style|top-right-radius|top-left-radius|top-color|top|timing-function|text-wrap|text-transform|text-shadow|text-replace|text-rendering|text-overflow|text-outline|text-justify|text-indent|text-height|text-emphasis|text-decoration|text-align-last|text-align|text|target-position|target-new|target-name|target|table-layout|tab-size|style-type|style-position|style-image|style|string-set|stretch|stress|stacking-strategy|stacking-shift|stacking-ruby|stacking|src|speed|speech-rate|speech|speak-punctuation|speak-numeral|speak-header|speak|span|spacing|space-collapse|space|sizing|size-adjust|size|shadow|respond-to|rule-width|rule-style|rule-color|rule|ruby-span|ruby-position|ruby-overhang|ruby-align|ruby|rows|rotation-point|rotation|role|right-width|right-style|right-color|right|richness|rest-before|rest-after|rest|resource|resize|reset|replace|repeat|rendering-intent|rate|radius|quotes|punctuation-trim|punctuation|property|profile|presentation-level|presentation|position|pointer-events|point|play-state|play-during|play-count|pitch-range|pitch|phonemes|pause-before|pause-after|pause|page-policy|page-break-inside|page-break-before|page-break-after|page|padding-top|padding-right|padding-left|padding-bottom|padding|pack|overhang|overflow-y|overflow-x|overflow-style|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|origin|orientation|orient|ordinal-group|order|opacity|offset|numeral|new|nav-up|nav-right|nav-left|nav-index|nav-down|nav|name|move-to|model|mix-blend-mode|min-width|min-height|min|max-width|max-height|max|marquee-style|marquee-speed|marquee-play-count|marquee-direction|marquee|marks|mark-before|mark-after|mark|margin-top|margin-right|margin-left|margin-bottom|margin|mask-image|list-style-type|list-style-position|list-style-image|list-style|list|lines|line-stacking-strategy|line-stacking-shift|line-stacking-ruby|line-stacking|line-height|line-break|level|letter-spacing|length|left-width|left-style|left-color|left|label|justify-content|justify|iteration-count|inline-box-align|initial-value|initial-size|initial-before-align|initial-before-adjust|initial-after-align|initial-after-adjust|index|indent|increment|image-resolution|image-orientation|image|icon|hyphens|hyphenate-resource|hyphenate-lines|hyphenate-character|hyphenate-before|hyphenate-after|hyphenate|height|header|hanging-punctuation|gap|grid|grid-area|grid-auto-columns|grid-auto-flow|grid-auto-rows|grid-column|grid-column-end|grid-column-start|grid-row|grid-row-end|grid-row-start|grid-template|grid-template-areas|grid-template-columns|grid-template-rows|row-gap|gap|font-kerning|font-language-override|font-weight|font-variant-caps|font-variant|font-style|font-synthesis|font-stretch|font-size-adjust|font-size|font-family|font|float-offset|float|flex-wrap|flex-shrink|flex-grow|flex-group|flex-flow|flex-direction|flex-basis|flex|fit-position|fit|fill|filter|family|empty-cells|emphasis|elevation|duration|drop-initial-value|drop-initial-size|drop-initial-before-align|drop-initial-before-adjust|drop-initial-after-align|drop-initial-after-adjust|drop|down|dominant-baseline|display-role|display-model|display|direction|delay|decoration-break|decoration|cursor|cue-before|cue-after|cue|crop|counter-reset|counter-increment|counter|count|content|columns|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|column-break-before|column-break-after|column|color-profile|color|collapse|clip|clear|character|caption-side|break-inside|break-before|break-after|break|box-sizing|box-shadow|box-pack|box-orient|box-ordinal-group|box-lines|box-flex-group|box-flex|box-direction|box-decoration-break|box-align|box|bottom-width|bottom-style|bottom-right-radius|bottom-left-radius|bottom-color|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-length|border-left-width|border-left-style|border-left-color|border-left|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|bookmark-target|bookmark-level|bookmark-label|bookmark|binding|bidi|before|baseline-shift|baseline|balance|background-blend-mode|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-break|background-attachment|background|azimuth|attachment|appearance|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-duration|animation-direction|animation-delay|animation-fill-mode|animation|alignment-baseline|alignment-adjust|alignment|align-self|align-last|align-items|align-content|align|after|adjust|will-change)|\n (writing-mode|text-anchor|stroke-width|stroke-opacity|stroke-miterlimit|stroke-linejoin|stroke-linecap|stroke-dashoffset|stroke-dasharray|stroke|stop-opacity|stop-color|shape-rendering|marker-start|marker-mid|marker-end|lighting-color|kerning|image-rendering|glyph-orientation-vertical|glyph-orientation-horizontal|flood-opacity|flood-color|fill-rule|fill-opacity|fill|enable-background|color-rendering|color-interpolation-filters|color-interpolation|clip-rule|clip-path)|\n ([a-zA-Z_-][a-zA-Z0-9_-]*)\n)(?!([^\\S\\n]*&)|([^\\S\\n]*\\{))(?=:|([^\\S\\n]+[^\\s])))", |
| 414 |
"beginCaptures": { |
| 415 |
"1": { |
| 416 |
"name": "support.type.property-name.css" |
| 417 |
}, |
| 418 |
"2": { |
| 419 |
"name": "support.type.property-name.svg.css" |
| 420 |
}, |
| 421 |
"3": { |
| 422 |
"name": "support.function.mixin.stylus" |
| 423 |
} |
| 424 |
}, |
| 425 |
"end": "(;)|(?=\\n|\\}|$)", |
| 426 |
"endCaptures": { |
| 427 |
"1": { |
| 428 |
"name": "punctuation.terminator.rule.css" |
| 429 |
} |
| 430 |
}, |
| 431 |
"patterns": [ |
| 432 |
{ |
| 433 |
"include": "#property_value" |
| 434 |
} |
| 435 |
] |
| 436 |
}, |
| 437 |
"property_value": { |
| 438 |
"begin": "\\G(?:(:)|(\\s))(\\s*)(?!&)", |
| 439 |
"beginCaptures": { |
| 440 |
"1": { |
| 441 |
"name": "punctuation.separator.key-value.css" |
| 442 |
}, |
| 443 |
"2": { |
| 444 |
"name": "punctuation.separator.key-value.css" |
| 445 |
} |
| 446 |
}, |
| 447 |
"end": "(?=\\n|;|\\})", |
| 448 |
"endCaptures": { |
| 449 |
"1": { |
| 450 |
"name": "punctuation.terminator.rule.css" |
| 451 |
} |
| 452 |
}, |
| 453 |
"name": "meta.property-value.css", |
| 454 |
"patterns": [ |
| 455 |
{ |
| 456 |
"include": "#property_values" |
| 457 |
}, |
| 458 |
{ |
| 459 |
"match": "[^\\n]+?" |
| 460 |
} |
| 461 |
] |
| 462 |
}, |
| 463 |
"property_values": { |
| 464 |
"patterns": [ |
| 465 |
{ |
| 466 |
"include": "#function" |
| 467 |
}, |
| 468 |
{ |
| 469 |
"include": "#comment" |
| 470 |
}, |
| 471 |
{ |
| 472 |
"include": "#language_keywords" |
| 473 |
}, |
| 474 |
{ |
| 475 |
"include": "#language_constants" |
| 476 |
}, |
| 477 |
{ |
| 478 |
"match": "(?:(?=\\w)(?<![\\w-]))(wrap-reverse|wrap|whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|unicase|underline|ultra-expanded|ultra-condensed|transparent|transform|top|titling-caps|thin|thick|text-top|text-bottom|text|tb-rl|table-row-group|table-row|table-header-group|table-footer-group|table-column-group|table-column|table-cell|table|sw-resize|super|strict|stretch|step-start|step-end|static|square|space-between|space-around|space|solid|soft-light|small-caps|separate|semi-expanded|semi-condensed|se-resize|scroll|screen|saturation|s-resize|running|rtl|row-reverse|row-resize|row|round|right|ridge|reverse|repeat-y|repeat-x|repeat|relative|progressive|progress|pre-wrap|pre-line|pre|pointer|petite-caps|paused|pan-x|pan-left|pan-right|pan-y|pan-up|pan-down|padding-box|overline|overlay|outside|outset|optimizeSpeed|optimizeLegibility|opacity|oblique|nw-resize|nowrap|not-allowed|normal|none|no-repeat|no-drop|newspaper|ne-resize|n-resize|multiply|move|middle|medium|max-height|manipulation|main-size|luminosity|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|local|list-item|linear(?!-)|line-through|line-edge|line|lighter|lighten|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline-block|inline|inherit|infinite|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|hue|horizontal|hidden|help|hard-light|hand|groove|geometricPrecision|forwards|flex-start|flex-end|flex|fixed|extra-expanded|extra-condensed|expanded|exclusion|ellipsis|ease-out|ease-in-out|ease-in|ease|e-resize|double|dotted|distribute-space|distribute-letter|distribute-all-lines|distribute|disc|disabled|difference|default|decimal|dashed|darken|currentColor|crosshair|cover|content-box|contain|condensed|column-reverse|column|color-dodge|color-burn|color|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|border-box|bolder|bold|block|bidi-override|below|baseline|balance|backwards|auto|antialiased|always|alternate-reverse|alternate|all-small-caps|all-scroll|all-petite-caps|all|absolute)(?:(?<=\\w)(?![\\w-]))", |
| 479 |
"name": "support.constant.property-value.css" |
| 480 |
}, |
| 481 |
{ |
| 482 |
"match": "(?:(?=\\w)(?<![\\w-]))(start|sRGB|square|round|optimizeSpeed|optimizeQuality|nonzero|miter|middle|linearRGB|geometricPrecision |evenodd |end |crispEdges|butt|bevel)(?:(?<=\\w)(?![\\w-]))", |
| 483 |
"name": "support.constant.property-value.svg.css" |
| 484 |
}, |
| 485 |
{ |
| 486 |
"include": "#font_name" |
| 487 |
}, |
| 488 |
{ |
| 489 |
"include": "#numeric" |
| 490 |
}, |
| 491 |
{ |
| 492 |
"include": "#color" |
| 493 |
}, |
| 494 |
{ |
| 495 |
"include": "#string" |
| 496 |
}, |
| 497 |
{ |
| 498 |
"match": "\\!\\s*important", |
| 499 |
"name": "keyword.other.important.css" |
| 500 |
}, |
| 501 |
{ |
| 502 |
"include": "#operator" |
| 503 |
}, |
| 504 |
{ |
| 505 |
"include": "#stylus_keywords" |
| 506 |
}, |
| 507 |
{ |
| 508 |
"include": "#property_variable" |
| 509 |
} |
| 510 |
] |
| 511 |
}, |
| 512 |
"numeric": { |
| 513 |
"patterns": [ |
| 514 |
{ |
| 515 |
"captures": { |
| 516 |
"1": { |
| 517 |
"name": "keyword.other.unit.css" |
| 518 |
} |
| 519 |
}, |
| 520 |
"match": "(?x) (?<!\\w|-)(?:(?:-|\\+)?(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+)) ((?:px|pt|ch|cm|mm|in|r?em|ex|pc|deg|g?rad|dpi|dpcm|dppx|fr|ms|s|turn|vh|vmax|vmin|vw)\\b|%)?", |
| 521 |
"name": "constant.numeric.css" |
| 522 |
} |
| 523 |
] |
| 524 |
}, |
| 525 |
"color": { |
| 526 |
"patterns": [ |
| 527 |
{ |
| 528 |
"begin": "\\b(rgb|rgba|hsl|hsla)(\\()", |
| 529 |
"beginCaptures": { |
| 530 |
"1": { |
| 531 |
"name": "support.function.color.css" |
| 532 |
}, |
| 533 |
"2": { |
| 534 |
"name": "punctuation.section.function.css" |
| 535 |
} |
| 536 |
}, |
| 537 |
"end": "(\\))", |
| 538 |
"endCaptures": { |
| 539 |
"1": { |
| 540 |
"name": "punctuation.section.function.css" |
| 541 |
} |
| 542 |
}, |
| 543 |
"name": "meta.function.color.css", |
| 544 |
"patterns": [ |
| 545 |
{ |
| 546 |
"match": "\\s*(,)\\s*", |
| 547 |
"name": "punctuation.separator.parameter.css" |
| 548 |
}, |
| 549 |
{ |
| 550 |
"include": "#numeric" |
| 551 |
}, |
| 552 |
{ |
| 553 |
"include": "#property_variable" |
| 554 |
} |
| 555 |
] |
| 556 |
}, |
| 557 |
{ |
| 558 |
"captures": { |
| 559 |
"1": { |
| 560 |
"name": "punctuation.definition.constant.css" |
| 561 |
} |
| 562 |
}, |
| 563 |
"match": "(#)([0-9a-fA-F]{3}|[0-9a-fA-F]{6})\\b", |
| 564 |
"name": "constant.other.color.rgb-value.css" |
| 565 |
}, |
| 566 |
{ |
| 567 |
"comment": "http://www.w3.org/TR/CSS21/syndata.html#value-def-color", |
| 568 |
"match": "\\b(aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)\\b", |
| 569 |
"name": "support.constant.color.w3c-standard-color-name.css" |
| 570 |
}, |
| 571 |
{ |
| 572 |
"comment": "http://www.w3.org/TR/css3-color/#svg-color", |
| 573 |
"match": "\\b(aliceblue|antiquewhite|aquamarine|azure|beige|bisque|blanchedalmond|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|gainsboro|ghostwhite|gold|goldenrod|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|limegreen|linen|magenta|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|oldlace|olivedrab|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|thistle|tomato|turquoise|violet|wheat|whitesmoke|yellowgreen)\\b", |
| 574 |
"name": "support.constant.color.w3c-extended-color-name.css" |
| 575 |
} |
| 576 |
] |
| 577 |
}, |
| 578 |
"string": { |
| 579 |
"patterns": [ |
| 580 |
{ |
| 581 |
"begin": "\"", |
| 582 |
"beginCaptures": { |
| 583 |
"0": { |
| 584 |
"name": "punctuation.definition.string.begin.css" |
| 585 |
} |
| 586 |
}, |
| 587 |
"end": "\"", |
| 588 |
"endCaptures": { |
| 589 |
"0": { |
| 590 |
"name": "punctuation.definition.string.end.css" |
| 591 |
} |
| 592 |
}, |
| 593 |
"name": "string.quoted.double.css", |
| 594 |
"patterns": [ |
| 595 |
{ |
| 596 |
"match": "\\\\([a-fA-F0-9]{1,6}|.)", |
| 597 |
"name": "constant.character.escape.css" |
| 598 |
} |
| 599 |
] |
| 600 |
}, |
| 601 |
{ |
| 602 |
"begin": "'", |
| 603 |
"beginCaptures": { |
| 604 |
"0": { |
| 605 |
"name": "punctuation.definition.string.begin.css" |
| 606 |
} |
| 607 |
}, |
| 608 |
"end": "'", |
| 609 |
"endCaptures": { |
| 610 |
"0": { |
| 611 |
"name": "punctuation.definition.string.end.css" |
| 612 |
} |
| 613 |
}, |
| 614 |
"name": "string.quoted.single.css", |
| 615 |
"patterns": [ |
| 616 |
{ |
| 617 |
"match": "\\\\([a-fA-F0-9]{1,6}|.)", |
| 618 |
"name": "constant.character.escape.css" |
| 619 |
} |
| 620 |
] |
| 621 |
} |
| 622 |
] |
| 623 |
}, |
| 624 |
"at_rule": { |
| 625 |
"patterns": [ |
| 626 |
{ |
| 627 |
"begin": "\\s*((@)(import|require))\\b\\s*", |
| 628 |
"beginCaptures": { |
| 629 |
"1": { |
| 630 |
"name": "keyword.control.at-rule.import.stylus" |
| 631 |
}, |
| 632 |
"2": { |
| 633 |
"name": "punctuation.definition.keyword.stylus" |
| 634 |
} |
| 635 |
}, |
| 636 |
"end": "\\s*((?=;|$|\\n))", |
| 637 |
"endCaptures": { |
| 638 |
"1": { |
| 639 |
"name": "punctuation.terminator.rule.css" |
| 640 |
} |
| 641 |
}, |
| 642 |
"name": "meta.at-rule.import.css", |
| 643 |
"patterns": [ |
| 644 |
{ |
| 645 |
"include": "#string" |
| 646 |
} |
| 647 |
] |
| 648 |
}, |
| 649 |
{ |
| 650 |
"begin": "\\s*((@)(extend[s]?)\\b)\\s*", |
| 651 |
"beginCaptures": { |
| 652 |
"1": { |
| 653 |
"name": "keyword.control.at-rule.extend.stylus" |
| 654 |
}, |
| 655 |
"2": { |
| 656 |
"name": "punctuation.definition.keyword.stylus" |
| 657 |
} |
| 658 |
}, |
| 659 |
"end": "\\s*((?=;|$|\\n))", |
| 660 |
"endCaptures": { |
| 661 |
"1": { |
| 662 |
"name": "punctuation.terminator.rule.css" |
| 663 |
} |
| 664 |
}, |
| 665 |
"name": "meta.at-rule.extend.css", |
| 666 |
"patterns": [ |
| 667 |
{ |
| 668 |
"include": "#selector" |
| 669 |
} |
| 670 |
] |
| 671 |
}, |
| 672 |
{ |
| 673 |
"match": "^\\s*((@)font-face)\\b", |
| 674 |
"captures": { |
| 675 |
"1": { |
| 676 |
"name": "keyword.control.at-rule.fontface.stylus" |
| 677 |
}, |
| 678 |
"2": { |
| 679 |
"name": "punctuation.definition.keyword.stylus" |
| 680 |
} |
| 681 |
}, |
| 682 |
"name": "meta.at-rule.fontface.stylus" |
| 683 |
}, |
| 684 |
{ |
| 685 |
"match": "^\\s*((@)css)\\b", |
| 686 |
"captures": { |
| 687 |
"1": { |
| 688 |
"name": "keyword.control.at-rule.css.stylus" |
| 689 |
}, |
| 690 |
"2": { |
| 691 |
"name": "punctuation.definition.keyword.stylus" |
| 692 |
} |
| 693 |
}, |
| 694 |
"name": "meta.at-rule.css.stylus" |
| 695 |
}, |
| 696 |
{ |
| 697 |
"begin": "\\s*((@)charset)\\b\\s*", |
| 698 |
"beginCaptures": { |
| 699 |
"1": { |
| 700 |
"name": "keyword.control.at-rule.charset.stylus" |
| 701 |
}, |
| 702 |
"2": { |
| 703 |
"name": "punctuation.definition.keyword.stylus" |
| 704 |
} |
| 705 |
}, |
| 706 |
"end": "\\s*((?=;|$|\\n))", |
| 707 |
"name": "meta.at-rule.charset.stylus", |
| 708 |
"patterns": [ |
| 709 |
{ |
| 710 |
"include": "#string" |
| 711 |
} |
| 712 |
] |
| 713 |
}, |
| 714 |
{ |
| 715 |
"begin": "\\s*((@)keyframes)\\b\\s+([a-zA-Z_-][a-zA-Z0-9_-]*)", |
| 716 |
"beginCaptures": { |
| 717 |
"1": { |
| 718 |
"name": "keyword.control.at-rule.keyframes.stylus" |
| 719 |
}, |
| 720 |
"2": { |
| 721 |
"name": "punctuation.definition.keyword.stylus" |
| 722 |
}, |
| 723 |
"3": { |
| 724 |
"name": "entity.name.function.keyframe.stylus" |
| 725 |
} |
| 726 |
}, |
| 727 |
"end": "\\s*((?=\\{|$|\\n))", |
| 728 |
"name": "meta.at-rule.keyframes.stylus" |
| 729 |
}, |
| 730 |
{ |
| 731 |
"begin": "(?=(\\b(\\d+%|from\\b|to\\b)))", |
| 732 |
"end": "(?=(\\{|\\n))", |
| 733 |
"name": "meta.at-rule.keyframes.stylus", |
| 734 |
"patterns": [ |
| 735 |
{ |
| 736 |
"match": "(\\b(\\d+%|from\\b|to\\b))", |
| 737 |
"name": "entity.other.attribute-name.stylus" |
| 738 |
} |
| 739 |
] |
| 740 |
}, |
| 741 |
{ |
| 742 |
"match": "^\\s*((@)media)\\b", |
| 743 |
"captures": { |
| 744 |
"1": { |
| 745 |
"name": "keyword.control.at-rule.media.stylus" |
| 746 |
}, |
| 747 |
"2": { |
| 748 |
"name": "punctuation.definition.keyword.stylus" |
| 749 |
} |
| 750 |
}, |
| 751 |
"name": "meta.at-rule.media.stylus" |
| 752 |
}, |
| 753 |
{ |
| 754 |
"match": "(?:(?=\\w)(?<![\\w-]))(width|scan|resolution|orientation|monochrome|min-width|min-resolution|min-monochrome|min-height|min-device-width|min-device-height|min-device-aspect-ratio|min-color-index|min-color|min-aspect-ratio|max-width|max-resolution|max-monochrome|max-height|max-device-width|max-device-height|max-device-aspect-ratio|max-color-index|max-color|max-aspect-ratio|height|grid|device-width|device-height|device-aspect-ratio|color-index|color|aspect-ratio)(?:(?<=\\w)(?![\\w-]))", |
| 755 |
"name": "support.type.property-name.media-feature.media.css" |
| 756 |
}, |
| 757 |
{ |
| 758 |
"match": "(?:(?=\\w)(?<![\\w-]))(tv|tty|screen|projection|print|handheld|embossed|braille|aural|all)(?:(?<=\\w)(?![\\w-]))", |
| 759 |
"name": "support.constant.media-type.media.css" |
| 760 |
}, |
| 761 |
{ |
| 762 |
"match": "(?:(?=\\w)(?<![\\w-]))(portrait|landscape)(?:(?<=\\w)(?![\\w-]))", |
| 763 |
"name": "support.constant.property-value.media-property.media.css" |
| 764 |
} |
| 765 |
] |
| 766 |
}, |
| 767 |
"operator": { |
| 768 |
"patterns": [ |
| 769 |
{ |
| 770 |
"match": "((?:\\?|:|!|~|\\+|(\\s-\\s)|(?:\\*)?\\*|\\/|%|(\\.)?\\.\\.|<|>|(?:=|:|\\?|\\+|-|\\*|\\/|%|<|>)?=|!=)|\\b(?:in|is(?:nt)?|(?<!:)not|or|and)\\b)", |
| 771 |
"name": "keyword.operator.stylus" |
| 772 |
}, |
| 773 |
{ |
| 774 |
"include": "#char_escape" |
| 775 |
} |
| 776 |
] |
| 777 |
}, |
| 778 |
"font_name": { |
| 779 |
"match": "(\\b(?i:arial|century|comic|courier|cursive|fantasy|futura|garamond|georgia|helvetica|impact|lucida|monospace|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif)\\b)", |
| 780 |
"name": "support.constant.font-name.css" |
| 781 |
}, |
| 782 |
"variable": { |
| 783 |
"match": "(\\$[a-zA-Z_-][a-zA-Z0-9_-]*)", |
| 784 |
"name": "variable.stylus" |
| 785 |
}, |
| 786 |
"property_variable": { |
| 787 |
"patterns": [ |
| 788 |
{ |
| 789 |
"include": "#variable" |
| 790 |
}, |
| 791 |
{ |
| 792 |
"match": "(?<!^)(\\@[a-zA-Z_-][a-zA-Z0-9_-]*)", |
| 793 |
"name": "variable.property.stylus" |
| 794 |
} |
| 795 |
] |
| 796 |
}, |
| 797 |
"function": { |
| 798 |
"begin": "(?=[a-zA-Z_-][a-zA-Z0-9_-]*\\()", |
| 799 |
"end": "(\\))", |
| 800 |
"endCaptures": { |
| 801 |
"1": { |
| 802 |
"name": "punctuation.section.function.css" |
| 803 |
} |
| 804 |
}, |
| 805 |
"patterns": [ |
| 806 |
{ |
| 807 |
"begin": "(format|url|local)(\\()", |
| 808 |
"beginCaptures": { |
| 809 |
"1": { |
| 810 |
"name": "support.function.misc.css" |
| 811 |
}, |
| 812 |
"2": { |
| 813 |
"name": "punctuation.section.function.css" |
| 814 |
} |
| 815 |
}, |
| 816 |
"end": "(?=\\))", |
| 817 |
"name": "meta.function.misc.css", |
| 818 |
"patterns": [ |
| 819 |
{ |
| 820 |
"match": "(?<=\\()[^\\)\\s]*(?=\\))", |
| 821 |
"name": "string.css" |
| 822 |
}, |
| 823 |
{ |
| 824 |
"include": "#string" |
| 825 |
}, |
| 826 |
{ |
| 827 |
"include": "#variable" |
| 828 |
}, |
| 829 |
{ |
| 830 |
"include": "#operator" |
| 831 |
}, |
| 832 |
{ |
| 833 |
"match": "\\s*" |
| 834 |
} |
| 835 |
] |
| 836 |
}, |
| 837 |
{ |
| 838 |
"match": "(counter)(\\()([a-zA-Z_-][a-zA-Z0-9_-]*)(?=\\))", |
| 839 |
"captures": { |
| 840 |
"1": { |
| 841 |
"name": "support.function.misc.counter.css" |
| 842 |
}, |
| 843 |
"2": { |
| 844 |
"name": "punctuation.section.function.css" |
| 845 |
}, |
| 846 |
"3": { |
| 847 |
"name": "variable.section.css" |
| 848 |
} |
| 849 |
}, |
| 850 |
"name": "meta.function.misc.counter.css" |
| 851 |
}, |
| 852 |
{ |
| 853 |
"begin": "(counters)(\\()", |
| 854 |
"beginCaptures": { |
| 855 |
"1": { |
| 856 |
"name": "support.function.misc.counters.css" |
| 857 |
}, |
| 858 |
"2": { |
| 859 |
"name": "punctuation.section.function.css" |
| 860 |
} |
| 861 |
}, |
| 862 |
"end": "(?=\\))", |
| 863 |
"name": "meta.function.misc.counters.css", |
| 864 |
"patterns": [ |
| 865 |
{ |
| 866 |
"match": "\\G[a-zA-Z_-][a-zA-Z0-9_-]*", |
| 867 |
"name": "variable.section.css" |
| 868 |
}, |
| 869 |
{ |
| 870 |
"match": "\\s*(,)\\s*", |
| 871 |
"name": "punctuation.separator.parameter.css" |
| 872 |
}, |
| 873 |
{ |
| 874 |
"include": "#string" |
| 875 |
}, |
| 876 |
{ |
| 877 |
"include": "#interpolation" |
| 878 |
} |
| 879 |
] |
| 880 |
}, |
| 881 |
{ |
| 882 |
"begin": "(attr)(\\()", |
| 883 |
"beginCaptures": { |
| 884 |
"1": { |
| 885 |
"name": "support.function.misc.attr.css" |
| 886 |
}, |
| 887 |
"2": { |
| 888 |
"name": "punctuation.section.function.css" |
| 889 |
} |
| 890 |
}, |
| 891 |
"end": "(?=\\))", |
| 892 |
"name": "meta.function.misc.attr.css", |
| 893 |
"patterns": [ |
| 894 |
{ |
| 895 |
"match": "\\G[a-zA-Z_-][a-zA-Z0-9_-]*", |
| 896 |
"name": "entity.other.attribute-name.attribute.css" |
| 897 |
}, |
| 898 |
{ |
| 899 |
"match": "(?<=[a-zA-Z0-9_-])\\s*\\b(string|color|url|integer|number|length|em|ex|px|rem|vw|vh|vmin|vmax|mm|cm|in|pt|pc|angle|deg|grad|rad|time|s|ms|frequency|Hz|kHz|%)\\b", |
| 900 |
"name": "support.type.attr.css" |
| 901 |
}, |
| 902 |
{ |
| 903 |
"match": "\\s*(,)\\s*", |
| 904 |
"name": "punctuation.separator.parameter.css" |
| 905 |
}, |
| 906 |
{ |
| 907 |
"include": "#string" |
| 908 |
}, |
| 909 |
{ |
| 910 |
"include": "#interpolation" |
| 911 |
} |
| 912 |
] |
| 913 |
}, |
| 914 |
{ |
| 915 |
"begin": "(calc)(\\()", |
| 916 |
"beginCaptures": { |
| 917 |
"1": { |
| 918 |
"name": "support.function.misc.calc.css" |
| 919 |
}, |
| 920 |
"2": { |
| 921 |
"name": "punctuation.section.function.css" |
| 922 |
} |
| 923 |
}, |
| 924 |
"end": "(?=\\))", |
| 925 |
"name": "meta.function.misc.calc.css", |
| 926 |
"patterns": [ |
| 927 |
{ |
| 928 |
"include": "#property_values" |
| 929 |
} |
| 930 |
] |
| 931 |
}, |
| 932 |
{ |
| 933 |
"begin": "(cubic-bezier)(\\()", |
| 934 |
"beginCaptures": { |
| 935 |
"1": { |
| 936 |
"name": "support.function.timing.cubic-bezier.css" |
| 937 |
}, |
| 938 |
"2": { |
| 939 |
"name": "punctuation.section.function.css" |
| 940 |
} |
| 941 |
}, |
| 942 |
"end": "(?=\\))", |
| 943 |
"name": "meta.function.timing.cubic-bezier.css", |
| 944 |
"patterns": [ |
| 945 |
{ |
| 946 |
"match": "\\s*(,)\\s*", |
| 947 |
"name": "punctuation.separator.parameter.css" |
| 948 |
}, |
| 949 |
{ |
| 950 |
"include": "#numeric" |
| 951 |
}, |
| 952 |
{ |
| 953 |
"include": "#interpolation" |
| 954 |
} |
| 955 |
] |
| 956 |
}, |
| 957 |
{ |
| 958 |
"begin": "(steps)(\\()", |
| 959 |
"beginCaptures": { |
| 960 |
"1": { |
| 961 |
"name": "support.function.timing.steps.css" |
| 962 |
}, |
| 963 |
"2": { |
| 964 |
"name": "punctuation.section.function.css" |
| 965 |
} |
| 966 |
}, |
| 967 |
"end": "(?=\\))", |
| 968 |
"name": "meta.function.timing.steps.css", |
| 969 |
"patterns": [ |
| 970 |
{ |
| 971 |
"match": "\\s*(,)\\s*", |
| 972 |
"name": "punctuation.separator.parameter.css" |
| 973 |
}, |
| 974 |
{ |
| 975 |
"include": "#numeric" |
| 976 |
}, |
| 977 |
{ |
| 978 |
"match": "\\b(start|end)\\b", |
| 979 |
"name": "support.constant.timing.steps.direction.css" |
| 980 |
}, |
| 981 |
{ |
| 982 |
"include": "#interpolation" |
| 983 |
} |
| 984 |
] |
| 985 |
}, |
| 986 |
{ |
| 987 |
"begin": "(linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient)(\\()", |
| 988 |
"beginCaptures": { |
| 989 |
"1": { |
| 990 |
"name": "support.function.gradient.css" |
| 991 |
}, |
| 992 |
"2": { |
| 993 |
"name": "punctuation.section.function.css" |
| 994 |
} |
| 995 |
}, |
| 996 |
"end": "(?=\\))", |
| 997 |
"name": "meta.function.gradient.css", |
| 998 |
"patterns": [ |
| 999 |
{ |
| 1000 |
"match": "\\s*(,)\\s*", |
| 1001 |
"name": "punctuation.separator.parameter.css" |
| 1002 |
}, |
| 1003 |
{ |
| 1004 |
"include": "#numeric" |
| 1005 |
}, |
| 1006 |
{ |
| 1007 |
"include": "#color" |
| 1008 |
}, |
| 1009 |
{ |
| 1010 |
"match": "\\b(to|bottom|right|left|top|circle|ellipse|center|closest-side|closest-corner|farthest-side|farthest-corner|at)\\b", |
| 1011 |
"name": "support.constant.gradient.css" |
| 1012 |
}, |
| 1013 |
{ |
| 1014 |
"include": "#interpolation" |
| 1015 |
} |
| 1016 |
] |
| 1017 |
}, |
| 1018 |
{ |
| 1019 |
"begin": "(blur|brightness|contrast|grayscale|hue-rotate|invert|opacity|saturate|sepia)(\\()", |
| 1020 |
"beginCaptures": { |
| 1021 |
"1": { |
| 1022 |
"name": "support.function.filter.css" |
| 1023 |
}, |
| 1024 |
"2": { |
| 1025 |
"name": "punctuation.section.function.css" |
| 1026 |
} |
| 1027 |
}, |
| 1028 |
"end": "(?=\\))", |
| 1029 |
"name": "meta.function.filter.css", |
| 1030 |
"patterns": [ |
| 1031 |
{ |
| 1032 |
"include": "#numeric" |
| 1033 |
}, |
| 1034 |
{ |
| 1035 |
"include": "#property_variable" |
| 1036 |
}, |
| 1037 |
{ |
| 1038 |
"include": "#interpolation" |
| 1039 |
} |
| 1040 |
] |
| 1041 |
}, |
| 1042 |
{ |
| 1043 |
"begin": "(drop-shadow)(\\()", |
| 1044 |
"beginCaptures": { |
| 1045 |
"1": { |
| 1046 |
"name": "support.function.filter.drop-shadow.css" |
| 1047 |
}, |
| 1048 |
"2": { |
| 1049 |
"name": "punctuation.section.function.css" |
| 1050 |
} |
| 1051 |
}, |
| 1052 |
"end": "(?=\\))", |
| 1053 |
"name": "meta.function.filter.drop-shadow.css", |
| 1054 |
"patterns": [ |
| 1055 |
{ |
| 1056 |
"include": "#numeric" |
| 1057 |
}, |
| 1058 |
{ |
| 1059 |
"include": "#color" |
| 1060 |
}, |
| 1061 |
{ |
| 1062 |
"include": "#property_variable" |
| 1063 |
}, |
| 1064 |
{ |
| 1065 |
"include": "#interpolation" |
| 1066 |
} |
| 1067 |
] |
| 1068 |
}, |
| 1069 |
{ |
| 1070 |
"begin": "(matrix|matrix3d|perspective|rotate|rotate3d|rotate[Xx]|rotate[yY]|rotate[zZ]|scale|scale3d|scale[xX]|scale[yY]|scale[zZ]|skew|skew[xX]|skew[yY]|translate|translate3d|translate[xX]|translate[yY]|translate[zZ])(\\()", |
| 1071 |
"beginCaptures": { |
| 1072 |
"1": { |
| 1073 |
"name": "support.function.transform.css" |
| 1074 |
}, |
| 1075 |
"2": { |
| 1076 |
"name": "punctuation.section.function.css" |
| 1077 |
} |
| 1078 |
}, |
| 1079 |
"end": "(?=\\))", |
| 1080 |
"name": "meta.function.transform.css", |
| 1081 |
"patterns": [ |
| 1082 |
{ |
| 1083 |
"include": "#numeric" |
| 1084 |
}, |
| 1085 |
{ |
| 1086 |
"include": "#property_variable" |
| 1087 |
}, |
| 1088 |
{ |
| 1089 |
"include": "#interpolation" |
| 1090 |
} |
| 1091 |
] |
| 1092 |
}, |
| 1093 |
{ |
| 1094 |
"match": "(url|local|format|counter|counters|attr|calc)(?=\\()", |
| 1095 |
"name": "support.function.misc.css" |
| 1096 |
}, |
| 1097 |
{ |
| 1098 |
"match": "(cubic-bezier|steps)(?=\\()", |
| 1099 |
"name": "support.function.timing.css" |
| 1100 |
}, |
| 1101 |
{ |
| 1102 |
"match": "(linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient)(?=\\()", |
| 1103 |
"name": "support.function.gradient.css" |
| 1104 |
}, |
| 1105 |
{ |
| 1106 |
"match": "(blur|brightness|contrast|drop-shadow|grayscale|hue-rotate|invert|opacity|saturate|sepia)(?=\\()", |
| 1107 |
"name": "support.function.filter.css" |
| 1108 |
}, |
| 1109 |
{ |
| 1110 |
"match": "(matrix|matrix3d|perspective|rotate|rotate3d|rotate[Xx]|rotate[yY]|rotate[zZ]|scale|scale3d|scale[xX]|scale[yY]|scale[zZ]|skew|skew[xX]|skew[yY]|translate|translate3d|translate[xX]|translate[yY]|translate[zZ])(?=\\()", |
| 1111 |
"name": "support.function.transform.css" |
| 1112 |
}, |
| 1113 |
{ |
| 1114 |
"begin": "([a-zA-Z_-][a-zA-Z0-9_-]*)(\\()", |
| 1115 |
"beginCaptures": { |
| 1116 |
"1": { |
| 1117 |
"name": "entity.name.function.stylus" |
| 1118 |
}, |
| 1119 |
"2": { |
| 1120 |
"name": "punctuation.section.function.css" |
| 1121 |
} |
| 1122 |
}, |
| 1123 |
"end": "(?=\\))", |
| 1124 |
"name": "meta.function.stylus", |
| 1125 |
"patterns": [ |
| 1126 |
{ |
| 1127 |
"name": "variable.argument.stylus", |
| 1128 |
"match": "(?x)\n--\n(?:[-a-zA-Z_] | [^\\x00-\\x7F]) # First letter\n(?:[-a-zA-Z0-9_] | [^\\x00-\\x7F] # Remainder of identifier\n |\\\\(?:[0-9a-fA-F]{1,6}|.)\n)*" |
| 1129 |
}, |
| 1130 |
{ |
| 1131 |
"match": "\\s*(,)\\s*", |
| 1132 |
"name": "punctuation.separator.parameter.css" |
| 1133 |
}, |
| 1134 |
{ |
| 1135 |
"include": "#interpolation" |
| 1136 |
}, |
| 1137 |
{ |
| 1138 |
"include": "#property_values" |
| 1139 |
} |
| 1140 |
] |
| 1141 |
}, |
| 1142 |
{ |
| 1143 |
"match": "\\(", |
| 1144 |
"name": "punctuation.section.function.css" |
| 1145 |
} |
| 1146 |
] |
| 1147 |
}, |
| 1148 |
"interpolation": { |
| 1149 |
"name": "meta.interpolation.stylus", |
| 1150 |
"begin": "(?:(\\{)[^\\S\\n]*)(?=[^;=]*[^\\S\\n]*\\})", |
| 1151 |
"beginCaptures": { |
| 1152 |
"1": { |
| 1153 |
"name": "meta.brace.curly" |
| 1154 |
} |
| 1155 |
}, |
| 1156 |
"end": "(?:[^\\S\\n]*(\\}))|\\n|$", |
| 1157 |
"endCaptures": { |
| 1158 |
"1": { |
| 1159 |
"name": "meta.brace.curly" |
| 1160 |
} |
| 1161 |
}, |
| 1162 |
"patterns": [ |
| 1163 |
{ |
| 1164 |
"include": "#variable" |
| 1165 |
}, |
| 1166 |
{ |
| 1167 |
"include": "#numeric" |
| 1168 |
}, |
| 1169 |
{ |
| 1170 |
"include": "#string" |
| 1171 |
}, |
| 1172 |
{ |
| 1173 |
"include": "#operator" |
| 1174 |
} |
| 1175 |
] |
| 1176 |
}, |
| 1177 |
"char_escape": { |
| 1178 |
"name": "constant.character.escape.stylus", |
| 1179 |
"match": "\\\\(.)" |
| 1180 |
}, |
| 1181 |
"language_constants": { |
| 1182 |
"match": "\\b(true|false|null)\\b", |
| 1183 |
"name": "constant.language.stylus" |
| 1184 |
}, |
| 1185 |
"language_keywords": { |
| 1186 |
"patterns": [ |
| 1187 |
{ |
| 1188 |
"match": "(\\b|\\s)(return|else|for|unless|if|else)\\b", |
| 1189 |
"name": "keyword.control.stylus" |
| 1190 |
}, |
| 1191 |
{ |
| 1192 |
"match": "(\\b|\\s)(!important|in|is defined|is a)\\b", |
| 1193 |
"name": "keyword.other.stylus" |
| 1194 |
}, |
| 1195 |
{ |
| 1196 |
"match": "\\barguments\\b", |
| 1197 |
"name": "variable.language.stylus" |
| 1198 |
} |
| 1199 |
] |
| 1200 |
} |
| 1201 |
} |
| 1202 |
} |
| 1203 |
|