Skip to content

Commit

Permalink
fix vendor prefixed property names
Browse files Browse the repository at this point in the history
  • Loading branch information
braver committed Nov 5, 2018
1 parent b22ec79 commit fa78cb1
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
7 changes: 5 additions & 2 deletions Syntaxes/SCSS.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,11 @@ contexts:

properties:
- include: comment-block
- match: "-(?:webkit|moz|ms|o)-"
scope: meta.property-name.css support.type.vendor-prefix.css
- match: "(-(?:webkit|moz|ms|o)-)({{ident}})"
captures:
0: meta.property-name.css
1: support.type.vendor-prefix.css
2: support.type.property-name.css
- include: custom-property-name
- match: '\b(var-)({{ident}})(?=\s)'
scope: meta.property-name.css invalid.deprecated.custom-property.css
Expand Down
7 changes: 5 additions & 2 deletions Syntaxes/Sass.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,11 @@ contexts:
- include: property-values

- include: comment-block
- match: "-(?:webkit|moz|ms|o)-"
scope: meta.property-name.css support.type.vendor-prefix.css
- match: "(-(?:webkit|moz|ms|o)-)({{ident}})"
captures:
0: meta.property-name.css
1: support.type.vendor-prefix.css
2: support.type.property-name.css
- include: custom-property-name
- match: '\b(var-)({{ident}})(?=\s)'
scope: meta.property-name.css invalid.deprecated.custom-property.css
Expand Down
4 changes: 4 additions & 0 deletions Tests/syntax_test_sass.sass
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ input:not([type="radio"]):not(h1):not(custom-element):not(%placeholder), select,
// ^^^^^^ variable.other.sass
// ^ punctuation.definition.variable.sass
-ms-text-size-adjust: 100%;
//^^^^^^^^^^^^^^^^^^^^ meta.property-name.css
//^^^^ support.type.vendor-prefix.css
.redbox:hover
background-color: #ff0000
color: #000000
Expand Down
9 changes: 6 additions & 3 deletions Tests/syntax_test_scss.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@
color: #000000
// ^^^^^^^ meta.property-value.css constant.other.color.rgb-value.css
}

main {
-ms-text-size-adjust: 100%;
// ^^^^^^^^^^^^^^^^^^^^ meta.property-name.css
// ^^^^ support.type.vendor-prefix.css
}
span:hover { }
// ^^^ entity.name.tag.css

Expand Down Expand Up @@ -132,9 +138,6 @@
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^ comment.line.double-slash
// ^^ punctuation.definition.comment

main {
-ms-text-size-adjust: 100%;
}

/*
Import Statements
Expand Down

0 comments on commit fa78cb1

Please sign in to comment.