Skip to content

Commit

Permalink
handle interpolation in selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
braver committed Feb 17, 2024
1 parent 946e561 commit a9ea500
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Syntaxes/SCSS.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ contexts:
pop: 1

selector-body:
- meta_append: true
- meta_prepend: true
- include: scss-interpolation
- include: scss-placeholder-selector

###[ CSS PROPERTY LISTS ]######################################################
Expand Down
5 changes: 5 additions & 0 deletions Tests/syntax_test_scss.scss
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,9 @@ $variable: first global value;
//=============================================================================
@mixin corner-icon($name, $top-or-bottom, $left-or-right) {
.icon-#{$name} {
//^^^^^^ entity.other.attribute-name.class.css
// ^^^^^^^ meta.interpolation.scss
// ^^^^^ variable.other.scss
background-image: url("/icons/#{$name}.svg");
// ^^^^^^^^ meta.interpolation.scss
position: absolute;
Expand Down Expand Up @@ -670,6 +673,8 @@ nav ul {

@for $i from 0 to length($selectors) {
#{nth($selectors, $i + 1)} {
// ^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.interpolation.scss
// ^ meta.selector
position: absolute;
height: $height;
margin-top: $i * $height;
Expand Down

0 comments on commit a9ea500

Please sign in to comment.