Skip to content

Commit

Permalink
add true/false/null
Browse files Browse the repository at this point in the history
  • Loading branch information
braver committed Feb 18, 2024
1 parent 4032119 commit 2727cf0
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Syntaxes/SCSS.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,12 @@ contexts:
- match: (?:\s*)\b(not|or|and)(?=\s)
captures:
1: keyword.operator.scss
- match: \btrue\b
scope: constant.language.boolean.true.scss
- match: \bfalse\b
scope: constant.language.boolean.false.scss
- match: \bnull\b
scope: constant.language.null.scss

###[ SCSS @ Rules ]############################################################

Expand Down
17 changes: 17 additions & 0 deletions Tests/syntax_test_scss.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1319,3 +1319,20 @@ $transition-speed: math.div(1s, 50px);
.slider {
@include move(10px, 120px);
}

//=============================================================================
// Operators
// https://sass-lang.com/documentation/operators/
//=============================================================================
@debug 1 + 2 * 3 == 1 + (2 * 3); // true
@debug true or false and false == true or (false and false); // true
// ^^^^ constant.language.boolean.true.scss
// ^^ keyword.operator.scss
// ^^^^^ constant.language.boolean.false.scss
// ^^ keyword.operator.scss
// ^^^^^^^^^^^^^^^^ meta.group.scss
// ^^^^ constant.language.boolean.false.scss
// ^^^ keyword.operator.scss
// ^^^^^ constant.language.boolean.false.scss
@debug (1 + 2) * 3; // 9
@debug ((1 + 2) * 3 + 4) * 5; // 65

0 comments on commit 2727cf0

Please sign in to comment.