Skip to content

Commit

Permalink
Save some lines of code
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
deathaxe committed Mar 9, 2024
1 parent ce470cd commit 1fd6c5b
Showing 1 changed file with 4 additions and 36 deletions.
40 changes: 4 additions & 36 deletions Syntaxes/SCSS.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]##################################################

Expand All @@ -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
Expand Down

0 comments on commit 1fd6c5b

Please sign in to comment.