Skip to content

Commit

Permalink
add scss expressions in font values
Browse files Browse the repository at this point in the history
  • Loading branch information
braver committed Feb 19, 2024
1 parent 1850fe8 commit b825317
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Syntaxes/SCSS.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
20 changes: 20 additions & 0 deletions Tests/syntax_test_scss.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit b825317

Please sign in to comment.