Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Several additions including builtin functions to CSS such as rgb() an…

…d rgba(), as well as builtin functions to LESS such as lighten() and darken(). I also added a few missing HTML elements and CSS properties, and added highlighting/recognition for value functions like -webkit-gradient and -moz-linear-gradient, along with Webkits strange functions like to() and from().
  • Loading branch information...
commit a202dd9942f96bac0ee3c42552a35480682790c9 1 parent 48ca177
@CarterA CarterA authored
Showing with 53 additions and 13 deletions.
  1. +53 −13 Syntaxes/LESS.tmLanguage
View
66 Syntaxes/LESS.tmLanguage
@@ -20,7 +20,7 @@
<array>
<dict>
<key>match</key>
- <string>\b(a|abbr|acronym|address|area|b|base|big|blockquote|body|br|button|caption|cite|code|col|colgroup|dd|del|dfn|div|dl|dt|em|fieldset|form|frame|frameset|(h[1-6])|head|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|map|meta|noframes|noscript|object|ol|optgroup|option|p|param|pre|q|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|ul|var|header|section|footer|article|nav|aside|hgroup|time|mark)\b</string>
+ <string>\b(a|abbr|acronym|address|area|b|base|big|blockquote|body|br|button|caption|cite|code|col|colgroup|dd|del|dfn|div|dl|dt|em|fieldset|figure|form|frame|frameset|(h[1-6])|head|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|map|meta|noframes|noscript|object|ol|optgroup|option|p|param|pre|q|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|ul|var|header|section|footer|article|nav|aside|hgroup|time|mark)\b</string>
<key>name</key>
<string>keyword.control.html.elements</string>
</dict>
@@ -71,6 +71,16 @@
<string>(\.[a-zA-Z0-9_-]+)[\s,{;]</string>
</dict>
<dict>
+ <key>begin</key>
+ <string>url\(</string>
+ <key>contentName</key>
+ <string>variable.parameter.url</string>
+ <key>end</key>
+ <string>\)</string>
+ <key>name</key>
+ <string>support.function.any-method.builtin.css</string>
+ </dict>
+ <dict>
<key>match</key>
<string>(#)([0-9a-fA-F]{3}|[0-9a-fA-F]{6})\b</string>
<key>name</key>
@@ -111,14 +121,6 @@
<string>keyword.unit.css</string>
</dict>
<dict>
- <key>begin</key>
- <string>url</string>
- <key>end</key>
- <string>\)</string>
- <key>name</key>
- <string>variable.parameter.url</string>
- </dict>
- <dict>
<key>captures</key>
<dict>
<key>1</key>
@@ -219,7 +221,7 @@
</dict>
</dict>
<key>match</key>
- <string>(-(?:webkit|moz|khtml|o|icab)-(?:border-radius|box-shadow|opacity|border-image))\s*:</string>
+ <string>(-(?:webkit|moz|khtml|o|icab)-(?:background-size|border-radius|box-shadow|opacity|border-image))\s*:</string>
</dict>
<dict>
<key>captures</key>
@@ -231,11 +233,11 @@
</dict>
</dict>
<key>match</key>
- <string>\b(azimuth|background-attachment|background-color|background-clip|background-image|background-position|background-repeat|background|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border-radius|border|box-shadow|bottom|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|opacity|orphans|outline-color|outline-style|outline-width|outline|overflow(-[xy])?|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|position|quotes|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|stress|table-layout|text-align|text-decoration|text-indent|text-shadow|text-transform|top|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index)\s*:</string>
+ <string>\b(azimuth|background-attachment|background-color|background-clip|background-image|background-position|background-repeat|background-size|background|behavior|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border-radius|border|box-shadow|bottom|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|opacity|orphans|outline-color|outline-style|outline-width|outline|overflow(-[xy])?|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|position|quotes|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|stress|table-layout|text-align|text-decoration|text-indent|text-shadow|text-transform|top|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index)\s*:</string>
</dict>
<dict>
<key>match</key>
- <string>\b(absolute|all-scroll|always|auto|baseline|below|bidi-override|block|bold|bolder|both|bottom|break-all|break-word|capitalize|center|char|circle|col-resize|collapse|crosshair|dashed|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fixed|groove|hand|help|hidden|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|keep-all|left|lighter|line-edge|line-through|line|list-item|loose|lower-alpha|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|super|sw-resize|table-footer-group|table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-roman|uppercase|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|padding-box)\b</string>
+ <string>\b(absolute|all-scroll|always|auto|baseline|below|bidi-override|block|bold|bolder|both|bottom|break-all|break-word|capitalize|center|char|circle|col-resize|collapse|crosshair|dashed|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fixed|groove|hand|help|hidden|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|keep-all|left|lighter|line-edge|line-through|line|linear|list-item|loose|lower-alpha|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|super|sw-resize|table-footer-group|table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-roman|uppercase|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|padding-box)\b</string>
<key>name</key>
<string>support.constant.property-value.css</string>
</dict>
@@ -246,6 +248,44 @@
<string>support.constant.font-name.css</string>
</dict>
<dict>
+ <key>comment</key>
+ <string>http://www.w3.org/TR/CSS21/syndata.html#value-def-color</string>
+ <key>match</key>
+ <string>\b(aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)\b</string>
+ <key>name</key>
+ <string>support.constant.color.w3c-standard-color-name.css</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\b(saturate|desaturate|lighten|darken|grayscale)\b</string>
+ <key>name</key>
+ <string>support.function.any-method.builtin.less</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\b(rgb|rgba|hsl|hsla|url)\b</string>
+ <key>name</key>
+ <string>support.function.any-method.builtin.css</string>
+ </dict>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>support.function.any-method.vendor.css</string>
+ </dict>
+ </dict>
+ <key>match</key>
+ <string>(-(?:webkit|moz|khtml|o|icab)-(?:gradient|linear-gradient))</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\b(color-stop|from|to)\b</string>
+ <key>name</key>
+ <string>support.function.any-method.webkit.gradient.css</string>
+ </dict>
+ <dict>
<key>captures</key>
<dict>
<key>1</key>
@@ -269,7 +309,7 @@
<key>match</key>
<string>@[a-zA-Z0-9_-][\w-]*</string>
<key>name</key>
- <string>variable.parameter.less</string>
+ <string>variable.other.less</string>
</dict>
<dict>
<key>match</key>
Please sign in to comment.
Something went wrong with that request. Please try again.