fix(css): make the highlights more sensible

This commit is contained in:
ObserverOfTime 2024-01-10 18:17:35 +02:00 committed by Christian Clason
parent fa38f4e6f9
commit 505a0e74cb
3 changed files with 31 additions and 25 deletions

View file

@ -5,19 +5,32 @@
"@supports"
"@keyframes"
(at_keyword)
] @keyword.directive
"@import" @keyword.import
[
(to)
(from)
] @keyword
"@import" @keyword.import
(comment) @comment @spell
(tag_name) @tag
(class_name) @type
(id_name) @constant
[
(property_name)
(feature_name)
] @property
[
(tag_name)
(nesting_selector)
(universal_selector)
] @type
] @character.special
(function_name) @function
@ -50,26 +63,20 @@
(pseudo_element_selector
"::"
(tag_name) @property)
(tag_name) @attribute)
(pseudo_class_selector
(class_name) @property)
(class_name) @attribute)
[
(class_name)
(id_name)
(property_name)
(feature_name)
(attribute_name)
] @property
(attribute_name) @tag.attribute
(namespace_name) @module
((property_name) @type.definition
(#lua-match? @type.definition "^[-][-]"))
((property_name) @variable
(#lua-match? @variable "^[-][-]"))
((plain_value) @type
(#lua-match? @type "^[-][-]"))
((plain_value) @variable
(#lua-match? @variable "^[-][-]"))
[
(string_value)
@ -77,10 +84,9 @@
(unit)
] @string
[
(integer_value)
(float_value)
] @number
(integer_value) @number
(float_value) @number.float
[
"#"

View file

@ -19,7 +19,7 @@
(id) @constant
(class) @property
(class) @type
(doctype) @keyword.directive
@ -56,7 +56,7 @@
(block_prepend
(keyword)+ @keyword)
(block_name) @type
(block_name) @module
(conditional
(keyword) @keyword.conditional)

View file

@ -23,10 +23,10 @@
(css_identifier) @function
(css_property
name: (css_property_name) @attribute)
name: (css_property_name) @property)
(css_property
value: (css_property_value) @attribute)
value: (css_property_value) @string)
[
(expression)