From 1fd6c5bd498f64da190ba625771ae132d211dbc4 Mon Sep 17 00:00:00 2001 From: deathaxe Date: Sat, 9 Mar 2024 20:23:07 +0100 Subject: [PATCH] Save some lines of code The `generic-font-names` context is used in all font related contexts. Thus prepending ordinary function calls there is probably the most easiest solution without duplicating whole contexts. --- Syntaxes/SCSS.sublime-syntax | 40 ++++-------------------------------- 1 file changed, 4 insertions(+), 36 deletions(-) diff --git a/Syntaxes/SCSS.sublime-syntax b/Syntaxes/SCSS.sublime-syntax index 6df6e309..d65f7aa0 100644 --- a/Syntaxes/SCSS.sublime-syntax +++ b/Syntaxes/SCSS.sublime-syntax @@ -229,39 +229,11 @@ contexts: - include: scss-global-operators - include: scss-value-expressions - font-family-value-content: - - meta_content_scope: meta.property-value.css - - include: value-prototype - - include: comma-delimiters - - include: important-operators - - include: scss-unqualified-functions - - include: quoted-strings - - include: global-constants - - include: generic-font-names - - include: font-family-names - - font-property-value-content: - - meta_content_scope: meta.property-value.css - - include: value-prototype - - include: comma-delimiters - - include: arithmetic-operators - - include: important-operators - - include: vendor-prefixes - - include: calc-functions - - include: color-values + generic-font-names: + # inject scss function calls to font property related contexts + # without rewriting them all. + - meta_prepend: true - include: scss-unqualified-functions - - include: numeric-constants - - include: quoted-strings - - include: global-constants - - include: generic-font-names - - include: font-display-constants - - include: font-prop-constants - - include: font-size-constants - - include: font-stretch-constants - - include: font-style-constants - - include: font-variant-constants - - include: font-weight-constants - - include: font-family-names ###[ CSS FUNCTION ARGUMENTS ]################################################## @@ -285,10 +257,6 @@ contexts: - meta_append: true - include: scss-identifiers-or-functions - local-function-arguments-list-body: - - meta_append: true - - include: scss-identifiers-or-functions - supports-function-arguments-list-body: - meta_append: true - include: scss-identifiers-or-functions