Skip to content

Commit

Permalink
allow various whitespace for properties
Browse files Browse the repository at this point in the history
  • Loading branch information
braver committed Nov 22, 2018
1 parent d2d6bf8 commit 5bbbfa4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
13 changes: 9 additions & 4 deletions LESS.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -618,15 +618,20 @@ contexts:
captures:
1: meta.property-value.css
2: punctuation.terminator.rule.css
- match: '(?=\s*($|[;})]))'
- match: '(?=\s*[;})])'
pop: true
- match: ':'
scope: punctuation.separator.key-value.css
- match: '\s*(:)'
captures:
1: punctuation.separator.key-value.css
push:
- meta_content_scope: meta.property-value.css
- match: '(?=\s*($|[;})]))'
- match: '(?=\s*[;})])'
pop: true
- include: property-values
- match: '(?={)'
pop: true
- match: ''
pop: true

property-values:
- match: \!\s*important
Expand Down
12 changes: 11 additions & 1 deletion syntax_test_less.less
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ html::before {
// ^ punctuation.definition.string.begin.less
// ^ string.interpolated.less
// ^ punctuation.definition.string.end.less
fill: rebeccapurple;
fill : rebeccapurple;
// ^ support.type.property-name.css
// ^ meta.property-value.css support.constant.color.w3c-extended-color-keywords.css
filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.3));
Expand Down Expand Up @@ -249,6 +249,16 @@ html::before {
}


/*
Support property values after a line break
*/
.grid {
grid-template-areas:
"header header"
"aside main";
}


/*
Mixins
http://lesscss.org/features/#mixins-feature
Expand Down

0 comments on commit 5bbbfa4

Please sign in to comment.