Skip to content

Commit

Permalink
fix #42 match property-values in lists
Browse files Browse the repository at this point in the history
  • Loading branch information
braver committed Dec 6, 2018
1 parent e3d85ce commit 4f2e30c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Syntaxes/Sass.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,7 @@ contexts:
| z-index|zero
| zoom(-in|-out)?
| ({{counter_styles}})
)\b(?=[\s;{)/])
)\b(?=[\s;{),/])
scope: support.constant.property-value.css
- match: \b(?i:sans-serif|serif|monospace|fantasy|cursive|system-ui)\b(?=\s*[;,\n}{])
scope: support.constant.font-name.css
Expand Down
13 changes: 10 additions & 3 deletions Tests/syntax_test_sass.sass
Original file line number Diff line number Diff line change
Expand Up @@ -428,9 +428,16 @@ $map: (
key-3: 123px
)
)
@each $animal, $color, $cursor in (puma, black, default),
(sea-slug, blue, pointer),
(egret, white, move)
$list: (top, bottom, right, position, height);
// ^^^ support.constant.property-value
// ^ punctuation.separator.css
// ^^^ support.constant.property-value
// ^ punctuation.separator.css
// ^^^ support.constant.property-value
// ^^^ string.unquoted
// ^ punctuation.separator.css
@each $animal, $color, $cursor in (puma, black, default),(sea-slug, blue, pointer), (egret, white, move)
.#{$animal-icon}
background-image: url('/images/#{$animal}.png')
border: 2px solid $color
Expand Down
8 changes: 8 additions & 0 deletions Tests/syntax_test_scss.scss
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,14 @@ $map: (
// ^^^^^^^^ meta.function-call
)
);
$list: (top, bottom, right, position, height);
// ^^^ support.constant.property-value
// ^ punctuation.separator.css
// ^^^ support.constant.property-value
// ^ punctuation.separator.css
// ^^^ support.constant.property-value
// ^^^ string.unquoted
// ^ punctuation.separator.css
@each $animal, $color, $cursor in (puma, black, default),
(sea-slug, blue, pointer),
(egret, white, move) {
Expand Down

0 comments on commit 4f2e30c

Please sign in to comment.