tree-sitter-css/properties/highlights.css

121 lines
1.7 KiB
CSS

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