From b8253177c7b13bb8b73462d6eb906395e77dfb3e Mon Sep 17 00:00:00 2001 From: Koen Lageveen Date: Mon, 19 Feb 2024 08:36:38 +0100 Subject: [PATCH] add scss expressions in font values --- Syntaxes/SCSS.sublime-syntax | 8 ++++++++ Tests/syntax_test_scss.scss | 20 ++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/Syntaxes/SCSS.sublime-syntax b/Syntaxes/SCSS.sublime-syntax index 5b9579bb..1f1654cd 100644 --- a/Syntaxes/SCSS.sublime-syntax +++ b/Syntaxes/SCSS.sublime-syntax @@ -169,6 +169,14 @@ contexts: - meta_prepend: true - include: scss-interpolation + font-family-value-content: + - meta_prepend: true + - include: scss-expression + + font-property-value-content: + - meta_prepend: true + - include: scss-expression + ###[ SCSS DEFAULT/GLOBAL VALUES ]############################################### scss-default-operators: diff --git a/Tests/syntax_test_scss.scss b/Tests/syntax_test_scss.scss index 514d4db0..8614c669 100644 --- a/Tests/syntax_test_scss.scss +++ b/Tests/syntax_test_scss.scss @@ -1340,3 +1340,23 @@ $transition-speed: math.div(1s, 50px); // ^^^^^ constant.language.boolean.false.scss @debug (1 + 2) * 3; // 9 @debug ((1 + 2) * 3 + 4) * 5; // 65 + + +//===========================================================================// +// Various other tests // +//===========================================================================// + + +//============================================================================= +// Expressions in font values +//============================================================================= +h2 { + font-family: create_family($default, sans-serif, Times New Roman); +// ^^^^^^^^^^^^^ support.function.scss +// ^^^^^^^^ variable.other.scss +// ^ punctuation.separator.sequence.css + font-weight: 20px + ($large * 2); +// ^^^^^^^^^^^^ meta.group.scss +// ^^^^^^ variable.other.scss +// ^ keyword.operator +}