Skip to content

Commit

Permalink
fix #90 include sass expression in calc function
Browse files Browse the repository at this point in the history
  • Loading branch information
braver committed Jan 23, 2022
1 parent 4794bb7 commit 952c85a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions Syntaxes/SCSS.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -2783,6 +2783,7 @@ contexts:
push: maybe-illegal-operator
- match: '[-+*/]'
scope: keyword.operator.arithmetic.css
- include: sass-value-expression

toggle-functions:
# toggle()
Expand Down
1 change: 1 addition & 0 deletions Syntaxes/Sass.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -2745,6 +2745,7 @@ contexts:
push: maybe-illegal-operator
- match: '[-+*/]'
scope: keyword.operator.arithmetic.css
- include: sass-value-expression

toggle-functions:
# toggle()
Expand Down
2 changes: 2 additions & 0 deletions Tests/syntax_test_sass.sass
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,8 @@ input:not([type="radio"]):not(h1):not(custom-element):not(%placeholder), select,
// ^ keyword.operator.arithmetic.sass
// ^ constant.numeric.value.css
// ^ punctuation.section.group.end.sass
padding: calc(#{spacer/2 - 5px})
// ^^^^^^^^^^^^^^^^^ meta.group.interpolation
transform: #{translate + $axis + '(' + $span * $aim + ')'}
// ^^^^^ variable.other
// ^ punctuation.definition.variable
Expand Down
2 changes: 2 additions & 0 deletions Tests/syntax_test_scss.scss
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,8 @@ color: format(
content: "I ate #{$value} pies!";
// ^^^^^^ variable.other.sass
// ^ punctuation.definition.variable.sass
padding: calc(#{spacer/2 - 5px});
// ^^^^^^^^^^^^^^^^^ meta.group.interpolation
@include breathe(somestring);
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function-call.sass
// ^^^^^^^^ keyword.control.directive.sass
Expand Down

0 comments on commit 952c85a

Please sign in to comment.