tree-sitter-css/properties/highlights.css

141 lines
3.3 KiB
CSS

@schema "tree-sitter-highlight-schema";
comment {
scope: 'comment';
}
tag_name,
nesting_selector,
universal_selector {
scope: 'tag';
}
sibling_selector > [token="~"],
child_selector > [token=">"],
adjacent_sibling_selector > [token="+"] {
scope: 'operator';
}
attribute_selector > {
& > [token="="],
& > [token="^="],
& > [token="|="],
& > [token="~="],
& > [token="$="],
& > [token="*="] {
scope: 'operator';
}
}
attribute_selector > plain_value {
scope: 'string';
}
pseudo_element_selector > tag_name,
pseudo_class_selector > class_name {
scope: 'attribute';
}
class_name {
scope: 'property';
}
id_name {
scope: 'property';
}
namespace_name {
scope: 'property';
}
function_name {
scope: 'function';
}
property_name,
plain_value {
&[text='^--'] {
scope: 'variable';
}
}
property_name {
scope: 'property';
}
attribute_name {
scope: 'attribute';
}
[token="@media"],
[token="@import"],
[token="@charset"],
[token="@namespace"],
[token="@supports"],
[token="@keyframes"],
at_keyword,
to,
from,
important {
scope: 'keyword';
}
string_value {
scope: 'string';
}
color_value {
scope: 'string.special';
}
integer_value,
float_value {
scope: 'number';
& > unit {
scope: 'type';
}
}
/* 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'
] */
feature_name {
scope: 'property';
}
color_value > [token="#"],
id_selector > [token="#"],
selectors > [token=","] {
scope: 'punctuation.delimiter';
}
[token="and"],
[token="or"],
[token="not"],
[token="only"],
keyword_query,
binary_expression > [token="+"],
binary_expression > [token="-"],
binary_expression > [token="/"],
binary_expression > [token="*"] {
scope: 'operator';
}