diff --git a/grammars/tree-sitter-css.cson b/grammars/tree-sitter-css.cson index 4ecb631..95d94c6 100644 --- a/grammars/tree-sitter-css.cson +++ b/grammars/tree-sitter-css.cson @@ -25,83 +25,200 @@ comments: scopes: 'stylesheet': 'source.css' - 'comment': 'comment' - - 'tag_name': 'entity.name.tag' - 'nesting_selector, universal_selector': 'entity.name.tag' - 'sibling_selector > "~"': 'keyword.operator.combinator' - 'child_selector > ">"': 'keyword.operator.combinator' - 'adjacent_sibling_selector > "+"': 'keyword.operator.combinator' - 'attribute_selector > "="': 'keyword.operator.pattern' - 'attribute_selector > "^="': 'keyword.operator.pattern' - 'attribute_selector > "|="': 'keyword.operator.pattern' - 'attribute_selector > "~="': 'keyword.operator.pattern' - 'attribute_selector > "$="': 'keyword.operator.pattern' - 'attribute_selector > "*="': 'keyword.operator.pattern' - 'attribute_selector > plain_value': 'string.unquoted.attribute-value' - 'pseudo_element_selector > tag_name': 'entity.other.attribute-name.pseudo-element' - 'pseudo_class_selector > class_name': 'entity.other.attribute-name.pseudo-class' - 'class_name': 'entity.other.attribute-name.class' - 'id_name': 'entity.other.attribute-name.id' - 'namespace_name': 'entity.namespace.name' - 'function_name': 'support.function' + + # Keyword + '"@media"': 'keyword.control.at-rule' + '"@import"': 'keyword.control.at-rule' + '"@charset"': 'keyword.control.at-rule' + '"@namespace"': 'keyword.control.at-rule' + '"@supports"': 'keyword.control.at-rule' + '"@keyframes"': 'keyword.control.at-rule' + 'at_keyword': 'keyword.control.at-rule' + + 'important': 'keyword.control.important' + + 'sibling_selector > "~"': 'keyword.operator.combinator.symbolic' + 'child_selector > ">"': 'keyword.operator.combinator.symbolic' + 'adjacent_sibling_selector > "+"': 'keyword.operator.combinator.symbolic' + 'nesting_selector > "&"': 'keyword.operator.combinator.symbolic' + + '"and"': 'keyword.operator.logical' + '"or"': 'keyword.operator.logical' + '"not"': 'keyword.operator.logical' + '"only"': 'keyword.operator.logical' + + 'attribute_selector > "="': 'keyword.operator.comparison.pattern.symbolic' + 'attribute_selector > "^="': 'keyword.operator.comparison.pattern.symbolic' + 'attribute_selector > "|="': 'keyword.operator.comparison.pattern.symbolic' + 'attribute_selector > "~="': 'keyword.operator.comparison.pattern.symbolic' + 'attribute_selector > "$="': 'keyword.operator.comparison.pattern.symbolic' + 'attribute_selector > "*="': 'keyword.operator.comparison.pattern.symbolic' + + 'binary_expression > "+"': 'keyword.operator.arithmetic.symbolic' + 'binary_expression > "-"': 'keyword.operator.arithmetic.symbolic' + 'binary_expression > "/"': 'keyword.operator.arithmetic.symbolic' + 'binary_expression > "*"': 'keyword.operator.arithmetic.symbolic' + + # Entity + 'tag_name': 'entity.selector.tag' + 'class_name': 'entity.selector.class' + 'id_name': 'entity.selector.id' + 'attribute_name': 'entity.selector.attribute' + + 'pseudo_element_selector > tag_name': [ + { + # https://www.w3.org/TR/2019/NOTE-css-2018-20190122/#selectors + match: '^(after|before|first-letter|first-line)$', + scopes: 'entity.selector.pseudo-element.support' + }, + 'entity.selector.pseudo-element' + ] + + 'pseudo_class_selector > class_name': [ + { + # https://www.w3.org/TR/2019/NOTE-css-2018-20190122/#selectors + match: '^(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|lang|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|root|target|visited)$', + scopes: 'entity.selector.pseudo-class.support' + }, + 'entity.selector.pseudo-class' + ] + + 'namespace_name': 'entity.namespace' + 'keyframes_name': 'entity.keyframes' + + 'function_name': [ + { + # https://developer.mozilla.org/en-US/docs/Web/CSS/Reference#Keyword_index + match: '^(annotation|attr|blur|brightness|calc|character-variant|circle|clamp|conic-gradient|contrast|counters|cross-fade|cubic-bezier|drop-shadow|element|ellipse|env|fit-content|format|grayscale|hsl|hsla|hue-rotate|image|image-set|inset|invert|leader|linear-gradient|local|matrix|matrix3d|max|min|minmax|opacity|ornaments|paint|perspective|polygon|radial-gradient|rect|repeat|repeating-linear-gradient|repeating-radial-gradient|rgb|rgba|rotate|rotate3d|rotateX|rotateY|rotateZ|saturate|scale|scale3d|scaleX|scaleY|scaleZ|selector|sepia|skew|skewX|skewY|steps|styleset|stylistic|swash|symbols|target-counter|target-counters|target-text|translate|translate3d|translateX|translateY|translateZ|url|var)$', + scopes: 'entity.function.support' + }, + 'entity.function' + ] 'property_name, plain_value': [ - {match: '^--', scopes: 'variable.css'} + { + match: '^--', + scopes: 'entity.variable' + } + ] + + 'property_name, feature_name': [ + { + # https://www.w3.org/Style/CSS/all-properties.en.html (WD, LC, CR, PR, REC) + match: '^(align-content|align-items|align-self|alignment-adjust|alignment-baseline|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|appearance|azimuth|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|baseline-shift|block-overflow|block-size|bookmark-label|bookmark-level|bookmark-state|border|border-block|border-block-color|border-block-end|border-block-end-color|border-block-end-style|border-block-end-width|border-block-start|border-block-start-color|border-block-start-style|border-block-start-width|border-block-style|border-block-width|border-bottom|border-bottom-color|border-bottom-fit-length|border-bottom-fit-width|border-bottom-image|border-bottom-left-fit-width|border-bottom-left-image|border-bottom-left-radius|border-bottom-right-fit-length|border-bottom-right-fit-width|border-bottom-right-image|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-bottoml-eft-fit-length|border-boundary|border-break|border-collapse|border-color|border-corner-fit|border-corner-image|border-corner-image-transform|border-end-end-radius|border-end-start-radius|border-fit|border-fit-length|border-fit-width|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-transform|border-image-width|border-inline|border-inline-color|border-inline-end|border-inline-end-color|border-inline-end-style|border-inline-end-width|border-inline-start|border-inline-start-color|border-inline-start-style|border-inline-start-width|border-inline-style|border-inline-width|border-left|border-left-color|border-left-fit-length|border-left-fit-width|border-left-image|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-fit-length|border-right-fit-width|border-right-image|border-right-style|border-right-width|border-spacing|border-start-end-radius|border-start-start-radius|border-style|border-top|border-top-color|border-top-fit-length|border-top-fit-width|border-top-image|border-top-left-fit-length|border-top-left-fit-width|border-top-left-image|border-top-left-radius|border-top-right-fit-length|border-top-right-fit-width|border-top-right-image|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-decoration-break|box-shadow|box-sizing|box-snap|break-after|break-before|break-inside|caption-side|caret|caret-color|caret-shape|clear|clip|clip-path|clip-rule|color|color-adjust|color-interpolation-filters|color-scheme|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|contain|content|continue|counter-increment|counter-reset|counter-set|cue|cue-after|cue-before|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|flood-color|flood-opacity|flow-from|flow-into|font|font-family|font-feature-settings|font-kerning|font-language-override|font-max-size|font-min-size|font-optical-sizing|font-palette|font-size|font-size-adjust|font-stretch|font-style|font-synthesis|font-synthesis-small-caps|font-synthesis-style|font-synthesis-weight|font-variant|font-variant-alternates|font-variant-caps|font-variant-east-asian|font-variant-emoji|font-variant-ligatures|font-variant-numeric|font-variant-position|font-variation-settings|font-weight|footnote-display|footnote-policy|forced-color-adjust|gap|glyph-orientation-vertical|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|hanging-punctuation|height|hyphenate-character|hyphenate-limit-chars|hyphenate-limit-last|hyphenate-limit-lines|hyphenate-limit-zone|hyphens|image-orientation|image-rendering|image-resolution|initial-letters|initial-letters-align|initial-letters-wrap|inline-box-align|inline-size|inline-sizing|inset|inset-block|inset-block-end|inset-block-start|inset-inline|inset-inline-end|inset-inline-start|isolation|justify-content|justify-items|justify-self|left|letter-spacing|lighting-color|line-break|line-clamp|line-grid|line-height|line-padding|line-snap|line-stacking|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|list-style|list-style-image|list-style-position|list-style-type|margin|margin-block|margin-block-end|margin-block-start|margin-bottom|margin-inline|margin-inline-end|margin-inline-start|margin-left|margin-right|margin-top|margin-trim|marker-side|mask|mask-border|mask-border-mode|mask-border-outset|mask-border-repeat|mask-border-slice|mask-border-source|mask-border-width|mask-clip|mask-composite|mask-image|mask-mode|mask-origin|mask-position|mask-repeat|mask-size|mask-type|max-block-size|max-height|max-inline-size|max-lines|max-width|min-block-size|min-height|min-inline-size|min-width|mix-blend-mode|nav-down|nav-left|nav-right|nav-up|object-fit|object-position|offset|offset-after|offset-anchor|offset-before|offset-distance|offset-end|offset-path|offset-position|offset-rotate|offset-start|opacity|order|orphans|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-block|overflow-inline|overflow-wrap|overflow-x|overflow-y|padding|padding-block|padding-block-end|padding-block-start|padding-bottom|padding-inline|padding-inline-end|padding-inline-start|padding-left|padding-right|padding-top|page|page-break-after|page-break-before|page-break-inside|pause|pause-after|pause-before|perspective|perspective-origin|pitch|pitch-range|place-content|place-items|place-self|play-during|position|quotes|region-fragment|resize|richness|right|row-gap|ruby-align|ruby-merge|ruby-position|running|scroll-behavior|scroll-margin|scroll-margin-block|scroll-margin-block-end|scroll-margin-block-start|scroll-margin-bottom|scroll-margin-inline|scroll-margin-inline-end|scroll-margin-inline-start|scroll-margin-left|scroll-margin-right|scroll-margin-top|scroll-padding|scroll-padding-block|scroll-padding-block-end|scroll-padding-block-start|scroll-padding-bottom|scroll-padding-inline|scroll-padding-inline-end|scroll-padding-inline-start|scroll-padding-left|scroll-padding-right|scroll-padding-top|scroll-snap-align|scroll-snap-stop|scroll-snap-type|shape-image-threshold|shape-inside|shape-margin|shape-outside|speak|speak-header|speak-numeral|speak-punctuation|speech-rate|stress|string-set|tab-size|table-layout|text-align|text-align-all|text-align-last|text-combine-upright|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-emphasis|text-emphasis-color|text-emphasis-position|text-emphasis-style|text-group-align|text-height|text-indent|text-justify|text-orientation|text-overflow|text-shadow|text-space-collapse|text-space-trim|text-spacing|text-transform|text-underline-position|text-wrap|top|transform|transform-box|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|vertical-align|visibility|voice-family|volume|white-space|widows|width|will-change|word-break|word-spacing|word-wrap|wrap-after|wrap-before|wrap-flow|wrap-inside|wrap-through|writing-mode|z-index)$', + scopes: 'entity.property.support' + }, + 'entity.property' + ] + + ''' + media_statement > binary_query > feature_query > feature_name, + import_statement > binary_query > feature_query > feature_name, + media_statement > feature_query > feature_name, + import_statement > feature_query > feature_name + ''': [ + { + # https://www.w3.org/TR/2017/CR-mediaqueries-4-20170905 + match: '^((min-|max-)?(aspect-ratio|color|color-index|height|monochrome|resolution|width)|any-hover|any-pointer|color-gamut|grid|hover|orientation|overflow-block|overflow-inline|pointer|scan|update)$', + scopes: 'entity.property.media.support' + }, + 'entity.property.media' + ] + + # String + 'string_value': 'string.quoted' + 'attribute_selector > string_value': 'string.quoted.attribute-value' + 'attribute_selector > plain_value': 'string.unquoted.attribute-value' + + # Constant + 'color_value': 'constant.color' + + 'integer_value': 'constant.numeric' + 'float_value': 'constant.numeric' + 'attribute_selector > integer_value': 'constant.numeric.attribute-value' + 'attribute_selector > float_value': 'constant.numeric.attribute-value' + + 'integer_value > unit, float_value > unit': [ + { + # https://www.w3.org/TR/2019/CR-css-values-3-20190606 + match: '^(ch|cm|deg|dpcm|dpi|dppx|em|ex|grad|Hz|in|kHz|mm|ms|pc|pt|px|Q|rad|rem|s|turn|vh|vmax|vmin|vw)$', + scopes: 'constant.numeric.unit.support' + }, + 'constant.numeric.unit' ] - 'property_name': 'support.property-name' - 'attribute_name': 'entity.other.attribute-name' - - ' - "@media", - "@import", - "@charset", - "@namespace", - "@supports", - "@keyframes", - at_keyword - ': 'keyword.control.at-rule' - - 'to, from': 'keyword.control' - - 'important': 'keyword.other.important.css' - - 'string_value': 'string' - 'color_value': 'constant.other.color' - 'integer_value': 'numeric.constant' - 'integer_value > unit': 'keyword.other.unit' - 'float_value': 'numeric.constant' - 'float_value > unit': 'keyword.other.unit' 'plain_value': [ - {match:'^(aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)$', scopes:'support.constant.color.w3c-standard'} - {match:'^(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|rebeccapurple|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell - |sienna|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|thistle|tomato - |transparent|turquoise|violet|wheat|whitesmoke|yellowgreen)$', scopes: 'support.constant.color.w3c-extended'} - 'support.constant.property-value.css' + { + # https://www.w3.org/TR/2018/REC-css-color-3-20180619/#svg-color + match: '^(aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|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|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|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|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen)$', + scopes: 'constant.color.support' + }, + { + # https://www.w3.org/TR/CSS22/propidx.html + # https://www.w3.org/TR/2019/NOTE-css-2018-20190122/#values + match: '^(above|absolute|add|additive|alias|all|all-scroll|allow-end|alpha|alphabetic|alternate|alternate-reverse|always|anywhere|arabic-indic|arithmetic|armenian|atop|auto|auto-fill|auto-fit|auto-flow|avoid|avoid-column|avoid-page|avoid-region|background-attachment|background-color|background-image|background-position|background-repeat|backgroundalpha|backgroundimage|backwards|balance|balance-all|baseline|behind|below|bengali|bidi-override|blink|block|bold|bolder|border-box|border-top-color|both|bottom|break-all|break-spaces|break-word|bullets|cambodian|capitalize|caption|cell|center|center-left|center-right|circle|cjk-decimal|cjk-earthly-branch|cjk-heavenly-stem|cjk-ideographic|clip|clone|close-quote|closest-corner|closest-side|coarse|code|col-resize|collapse|color|color-burn|color-dodge|column|column-reverse|contain|content|content-box|contents|context-menu|continuous|copy|cover|crisp-edges|crosshair|cue-after|cue-before|currentcolor|cyclic|darken|dashed|decimal|decimal-leading-zero|default|dense|devanagari|difference|digits|disc|disclosure-closed|disclosure-open|discrete|distribute|dot|dotted|double|double-circle|duplicate|e-resize|each-line|ease|ease-in|ease-in-out|ease-out|ellipse|ellipsis|embed|end|ethiopic-numeric|evenodd|ew-resize|exclude|exclusion|extends|far-left|far-right|farthest-corner|farthest-side|fast|faster|fill|fill-box|filled|fillpaint|fine|first|fixed|flex|flex-end|flex-start|flip|font-family|font-feature-settings|font-size|font-style|font-variant|font-weight|force-end|forwards|from-image|full-size-kana|full-width|gamma|georgian|grab|grabbing|grid|groove|gujarati|gurmukhi|hanging|hard-light|hebrew|help|hidden|hide|high|high-quality|higher|hiragana|hiragana-iroha|horizontal-tb|hover|hue|icon|identity|infinite|inherit|initial|inline|inline-block|inline-flex|inline-grid|inline-table|inset|inside|inter-character|inter-word|interlace|intersect|invert|isolate|isolate-override|italic|japanese-formal|japanese-informal|jump-both|jump-end|jump-none|jump-start|justify|justify-all|kannada|katakana|katakana-iroha|keep-all|khmer|korean-hangul-formal|korean-hanja-formal|korean-hanja-informal|landscape|lao|last|layout|left|left-side|leftwards|legacy|level|lighten|lighter|line-height|line-through|linear|linearrgb|list-item|list-style-image|list-style-position|list-style-type|local|loose|loud|low|lower|lower-alpha|lower-armenian|lower-greek|lower-latin|lower-roman|lowercase|ltr|luminance|luminosity|malayalam|mandatory|manual|margin-box|match-parent|match-source|max-content|medium|menu|message-box|middle|min-content|mix|mixed|mongolian|move|multiply|myanmar|n-resize|ne-resize|nesw-resize|no-clip|no-close-quote|no-composite|no-drop|no-open-quote|no-repeat|none|nonzero|normal|not-allowed|nowrap|ns-resize|numbers|numeric|nw-resize|nwse-resize|objectboundingbox|oblique|once|only|open|open-quote|optional-paged|oriya|outline-color|outline-style|outline-width|outset|outside|over|overlay|overline|p3|padding-box|page|paged|paint|paused|persian|pixel|pixelated|plaintext|pointer|portrait|pre|pre-line|pre-wrap|progress|progressive|proximity|rec2020|recto|region|relative|repeat|repeat-x|repeat-y|reverse|revert|ridge|right|right-side|rightwards|round|row|row-resize|row-reverse|rtl|running|s-resize|safe|saturation|scale-down|screen|scroll|scroll-position|se-resize|self-end|self-start|separate|sesame|show|sideways|sideways-right|silent|simp-chinese-formal|simp-chinese-informal|size|slice|slow|slower|small-caps|small-caption|smooth|soft|soft-light|solid|sourcealpha|sourcegraphic|space|space-around|space-between|space-evenly|span|spell-out|square|srgb|start|static|status-bar|step-end|step-start|stretch|strict|stroke-box|strokepaint|style|sub|subtract|super|sw-resize|symbolic|table|table-caption|table-cell|table-column|table-column-group|table-footer-group|table-header-group|table-row|table-row-group|tamil|telugu|text|text-bottom|text-top|thai|thick|thin|tibetan|top|trad-chinese-formal|trad-chinese-informal|transparent|triangle|under|underline|unit|unsafe|unset|upper-alpha|upper-armenian|upper-latin|upper-roman|uppercase|upright|userspaceonuse|verso|vertical-lr|vertical-rl|vertical-text|view-box|visible|w-resize|wait|words|wrap|wrap-reverse|x|x-fast|x-high|x-loud|x-low|x-slow|x-soft|y|zoom-in|zoom-out)$' + scopes: 'constant.style.support' + }, + 'constant' ] - 'feature_name': 'support.type.property-name' + 'keyword_query': [ + { + # https://www.w3.org/TR/2017/CR-mediaqueries-4-20170905/#media-types + match: '^(all|print|screen|speech)$' + scopes: 'constant.media.support' + }, + { + match: '^(aural|braille|embossed|handheld|projection|tty|tv)$' + scopes: 'constant.media.invalid.deprecated', + }, + 'constant' + ] + + 'keyframe_block > to': 'constant.offset' + 'keyframe_block > from': 'constant.offset' + 'keyframe_block > integer_value': 'constant.offset.numeric' + 'keyframe_block > integer_value > unit': 'constant.offset.numeric.unit' + + # Comment + 'comment': 'comment.block' + + # Punctuation + 'id_selector > "#"': 'punctuation.definition.selector.id' + 'class_selector > "."': 'punctuation.definition.selector.class' + 'pseudo_element_selector > "::"': 'punctuation.definition.selector.pseudo-element' + 'pseudo_class_selector > ":"': 'punctuation.definition.selector.pseudo-class' + '"*"': 'punctuation.definition.selector.wildcard' + + '";"': 'punctuation.delimiter' + '","': 'punctuation.delimiter' + '":"': 'punctuation.delimiter.pair' + '"{"': 'punctuation.delimiter.section' + '"}"': 'punctuation.delimiter.section' + '"("': 'punctuation.delimiter.arguments' + '")"': 'punctuation.delimiter.arguments' + + 'attribute_selector > "["': 'punctuation.delimiter.selector.attribute' + 'attribute_selector > "]"': 'punctuation.delimiter.selector.attribute' + + 'rule_set > block > "{"': 'punctuation.delimiter.section.properties' + 'rule_set > block > "}"': 'punctuation.delimiter.section.properties' + 'keyframe_block > block > "{"': 'punctuation.delimiter.section.properties' + 'keyframe_block > block > "}"': 'punctuation.delimiter.section.properties' + + 'parenthesized_value > "("': 'punctuation.delimiter.value' + 'parenthesized_value > ")"': 'punctuation.delimiter.value' + + 'parenthesized_query > "("': 'punctuation.delimiter.condition' + 'parenthesized_query > ")"': 'punctuation.delimiter.condition' + 'selector_query > "("': 'punctuation.delimiter.condition' + 'selector_query > ")"': 'punctuation.delimiter.condition' + 'feature_query > "("': 'punctuation.delimiter.condition' + 'feature_query > ")"': 'punctuation.delimiter.condition' - 'color_value > "#"': 'punctuation.definition.constant.css' - 'id_selector > "#"': 'punctuation.definition.entity.css' - 'selectors > ","': 'punctuation.separator.list.comma.css' + 'pseudo_class_selector > arguments > "("': 'punctuation.delimiter.arguments.pseudo-class' + 'pseudo_class_selector > arguments > ")"': 'punctuation.delimiter.arguments.pseudo-class' - '"and", "or", "not", "only"': 'keyword.operator' - 'keyword_query': 'keyword.operator' - 'binary_expression > "+"': 'keyword.operator' - 'binary_expression > "-"': 'keyword.operator' - 'binary_expression > "/"': 'keyword.operator' - 'binary_expression > "*"': 'keyword.operator' + # Meta + 'selectors': 'meta.selectors' + 'rule_set > block': 'meta.properties'