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

View file

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

View file

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