Permalink
Browse files

Merge improved syntax file, borrowing from appden/less.tmbundle,

and TM2 alpha / managed CSS bundle.
  • Loading branch information...
1 parent d3d91a8 commit 46db27791217f1cd85db92958b331995e539bfa3 @danro danro committed Dec 20, 2011
Showing with 309 additions and 4 deletions.
  1. +309 −4 Syntaxes/LESS.tmLanguage
View
@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>comment</key>
- <string></string>
+ <string>LeSS</string>
<key>fileTypes</key>
<array>
<string>less</string>
@@ -19,16 +19,321 @@
<key>patterns</key>
<array>
<dict>
- <key>include</key>
- <string>source.css</string>
+ <key>match</key>
+ <string>\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|samp|script|section|select|small|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\b</string>
+ <key>name</key>
+ <string>keyword.control.html.elements</string>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>"</string>
+ <key>end</key>
+ <string>"</string>
+ <key>name</key>
+ <string>string.quoted.double.css</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>match</key>
+ <string>\\.</string>
+ <key>name</key>
+ <string>constant.character.escaped.css</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>'</string>
+ <key>end</key>
+ <string>'</string>
+ <key>name</key>
+ <string>string.quoted.single.css</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>match</key>
+ <string>\\.</string>
+ <key>name</key>
+ <string>constant.character.escaped.css</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>entity.other.attribute-name.class.css</string>
+ </dict>
+ </dict>
+ <key>match</key>
+ <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>
+ <string>constant.other.rgb-value.css</string>
+ </dict>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>entity.other.attribute-name.id</string>
+ </dict>
+ </dict>
+ <key>match</key>
+ <string>#[a-zA-Z0-9_-]+</string>
+ <key>name</key>
+ <string>meta.selector.css</string>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>/\*</string>
+ <key>end</key>
+ <string>\*/</string>
+ <key>name</key>
+ <string>comment.block.css</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>(-|\+)?\s*[0-9]+(\.[0-9]+)?</string>
+ <key>name</key>
+ <string>constant.numeric.css</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>(?&lt;=[\d])(px|pt|cm|mm|in|em|ex|pc)\b|%</string>
+ <key>name</key>
+ <string>keyword.unit.css</string>
+ </dict>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.entity.css</string>
+ </dict>
+ </dict>
+ <key>match</key>
+ <string>(:+)\b(after|before|first-child|first-letter|first-line|selection)\b</string>
+ <key>name</key>
+ <string>entity.other.attribute-name.pseudo-element.css</string>
+ </dict>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.entity.css</string>
+ </dict>
+ </dict>
+ <key>match</key>
+ <string>(:)\b(active|hover|link|visited|focus)\b</string>
+ <key>name</key>
+ <string>entity.other.attribute-name.pseudo-class.css</string>
+ </dict>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.entity.css</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>entity.other.attribute-name.attribute.css</string>
+ </dict>
+ <key>3</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.separator.operator.css</string>
+ </dict>
+ <key>4</key>
+ <dict>
+ <key>name</key>
+ <string>string.unquoted.attribute-value.css</string>
+ </dict>
+ <key>5</key>
+ <dict>
+ <key>name</key>
+ <string>string.quoted.double.attribute-value.css</string>
+ </dict>
+ <key>6</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.string.begin.css</string>
+ </dict>
+ <key>7</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.string.end.css</string>
+ </dict>
+ </dict>
+ <key>match</key>
+ <string>(?i)(\[)\s*(-?[_a-z\\[[:^ascii:]]][_a-z0-9\-\\[[:^ascii:]]]*)(?:\s*([~|^$*]?=)\s*(?:(-?[_a-z\\[[:^ascii:]]][_a-z0-9\-\\[[:^ascii:]]]*)|((?&gt;(['"])(?:[^\\]|\\.)*?(\6)))))?\s*(\])</string>
+ <key>name</key>
+ <string>meta.attribute-selector.css</string>
+ </dict>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>keyword.control.at-rule.import.css</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.keyword.css</string>
+ </dict>
+ </dict>
+ <key>match</key>
+ <string>^\s*((@)import\b)</string>
+ <key>name</key>
+ <string>meta.at-rule.import.css</string>
+ </dict>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>support.type.property-name.css.vendor</string>
+ </dict>
+ </dict>
+ <key>match</key>
+ <string>(-(?:webkit|moz|khtml|o|icab)-(?:background-size|border-radius|box-shadow|opacity|border-image))\s*:</string>
+ </dict>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>support.type.property-name.css</string>
+ </dict>
+ </dict>
+ <key>match</key>
+ <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|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>
+ <dict>
+ <key>match</key>
+ <string>(\b(?i:arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace)\b)</string>
+ <key>name</key>
+ <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>
+ <dict>
+ <key>name</key>
+ <string>support.function.less</string>
+ </dict>
+ </dict>
+ <key>match</key>
+ <string>(\.[a-zA-Z0-9_-]+)\s*(;|\()</string>
</dict>
<dict>
<key>begin</key>
<string>//</string>
<key>end</key>
<string>$\n?</string>
<key>name</key>
- <string>comment.line.double-slash</string>
+ <string>comment.line.double-slash.less</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>@[a-zA-Z0-9_-][\w-]*</string>
+ <key>name</key>
+ <string>variable.other.less</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\$|%|&amp;|\*|\-\-|\-|\+\+|\+|~|===|==|=|!=|!==|&lt;=|&gt;=|&lt;&lt;=|&gt;&gt;=|&gt;&gt;&gt;=|&lt;&gt;|&lt;|&gt;|!|&amp;&amp;|\|\||\?\:|\*=|(?&lt;!\()/=|%=|\+=|\-=|&amp;=|\^=|\/\b</string>
+ <key>name</key>
+ <string>keyword.operator.less</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\{|\}</string>
+ <key>name</key>
+ <string>meta.brace.curly.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\(|\)</string>
+ <key>name</key>
+ <string>meta.brace.round.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\[|\]</string>
+ <key>name</key>
+ <string>meta.brace.square.js</string>
</dict>
</array>
<key>scopeName</key>

0 comments on commit 46db277

Please sign in to comment.