| 
									
										
										
										
											2008-07-13 17:41:49 +00:00
										 |  |  | " Vim syntax file | 
					
						
							| 
									
										
										
										
											2010-07-26 22:21:27 +02:00
										 |  |  | " Language:	Sass | 
					
						
							|  |  |  | " Maintainer:	Tim Pope <vimNOSPAM@tpope.org> | 
					
						
							|  |  |  | " Filenames:	*.sass | 
					
						
							| 
									
										
										
										
											2016-08-30 23:26:57 +02:00
										 |  |  | " Last Change:	2016 Aug 29 | 
					
						
							| 
									
										
										
										
											2008-07-13 17:41:49 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if exists("b:current_syntax") | 
					
						
							|  |  |  |   finish | 
					
						
							|  |  |  | endif | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | runtime! syntax/css.vim | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | syn case ignore | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | syn cluster sassCssProperties contains=cssFontProp,cssFontDescriptorProp,cssColorProp,cssTextProp,cssBoxProp,cssGeneratedContentProp,cssPagingProp,cssUIProp,cssRenderProp,cssAuralProp,cssTableProp | 
					
						
							| 
									
										
										
										
											2016-08-30 23:26:57 +02:00
										 |  |  | syn cluster sassCssAttributes contains=css.*Attr,sassEndOfLineComment,scssComment,cssValue.*,cssColor,cssURL,sassDefault,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssRenderProp | 
					
						
							| 
									
										
										
										
											2008-07-13 17:41:49 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-26 22:21:27 +02:00
										 |  |  | syn region sassDefinition matchgroup=cssBraces start="{" end="}" contains=TOP | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-06-01 14:50:56 +02:00
										 |  |  | syn match sassProperty "\%([{};]\s*\|^\)\@<=\%([[:alnum:]-]\|#{[^{}]*}\)\+\s*:" contains=css.*Prop skipwhite nextgroup=sassCssAttribute contained containedin=sassDefinition | 
					
						
							|  |  |  | syn match sassProperty "^\s*\zs\s\%(\%([[:alnum:]-]\|#{[^{}]*}\)\+\s*:\|:[[:alnum:]-]\+\)"hs=s+1 contains=css.*Prop skipwhite nextgroup=sassCssAttribute | 
					
						
							| 
									
										
										
										
											2010-07-26 22:21:27 +02:00
										 |  |  | syn match sassProperty "^\s*\zs\s\%(:\=[[:alnum:]-]\+\s*=\)"hs=s+1 contains=css.*Prop skipwhite nextgroup=sassCssAttribute | 
					
						
							| 
									
										
										
										
											2010-08-09 20:13:35 +02:00
										 |  |  | syn match sassCssAttribute +\%("\%([^"]\|\\"\)*"\|'\%([^']\|\\'\)*'\|#{[^{}]*}\|[^{};]\)*+ contained contains=@sassCssAttributes,sassVariable,sassFunction,sassInterpolation | 
					
						
							| 
									
										
										
										
											2010-07-26 22:21:27 +02:00
										 |  |  | syn match sassDefault "!default\>" contained | 
					
						
							|  |  |  | syn match sassVariable "!\%(important\>\|default\>\)\@![[:alnum:]_-]\+" | 
					
						
							|  |  |  | syn match sassVariable "$[[:alnum:]_-]\+" | 
					
						
							|  |  |  | syn match sassVariableAssignment "\%([!$][[:alnum:]_-]\+\s*\)\@<=\%(||\)\==" nextgroup=sassCssAttribute skipwhite | 
					
						
							|  |  |  | syn match sassVariableAssignment "\%([!$][[:alnum:]_-]\+\s*\)\@<=:" nextgroup=sassCssAttribute skipwhite | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | syn match sassFunction "\<\%(rgb\|rgba\|red\|green\|blue\|mix\)\>(\@=" contained | 
					
						
							|  |  |  | syn match sassFunction "\<\%(hsl\|hsla\|hue\|saturation\|lightness\|adjust-hue\|lighten\|darken\|saturate\|desaturate\|grayscale\|complement\)\>(\@=" contained | 
					
						
							|  |  |  | syn match sassFunction "\<\%(alpha\|opacity\|rgba\|opacify\|fade-in\|transparentize\|fade-out\)\>(\@=" contained | 
					
						
							|  |  |  | syn match sassFunction "\<\%(unquote\|quote\)\>(\@=" contained | 
					
						
							|  |  |  | syn match sassFunction "\<\%(percentage\|round\|ceil\|floor\|abs\)\>(\@=" contained | 
					
						
							|  |  |  | syn match sassFunction "\<\%(type-of\|unit\|unitless\|comparable\)\>(\@=" contained | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-06-01 14:50:56 +02:00
										 |  |  | syn region sassInterpolation matchgroup=sassInterpolationDelimiter start="#{" end="}" contains=@sassCssAttributes,sassVariable,sassFunction containedin=cssStringQ,cssStringQQ,cssPseudoClass,sassProperty | 
					
						
							| 
									
										
										
										
											2010-07-26 22:21:27 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | syn match sassMixinName "[[:alnum:]_-]\+" contained nextgroup=sassCssAttribute | 
					
						
							| 
									
										
										
										
											2013-06-01 14:50:56 +02:00
										 |  |  | syn match sassMixin  "^="               nextgroup=sassMixinName skipwhite | 
					
						
							| 
									
										
										
										
											2010-08-09 20:13:35 +02:00
										 |  |  | syn match sassMixin  "\%([{};]\s*\|^\s*\)\@<=@mixin"   nextgroup=sassMixinName skipwhite | 
					
						
							| 
									
										
										
										
											2010-07-26 22:21:27 +02:00
										 |  |  | syn match sassMixing "^\s\+\zs+"        nextgroup=sassMixinName | 
					
						
							| 
									
										
										
										
											2010-08-09 20:13:35 +02:00
										 |  |  | syn match sassMixing "\%([{};]\s*\|^\s*\)\@<=@include" nextgroup=sassMixinName skipwhite | 
					
						
							|  |  |  | syn match sassExtend "\%([{};]\s*\|^\s*\)\@<=@extend" | 
					
						
							| 
									
										
										
										
											2013-06-01 14:50:56 +02:00
										 |  |  | syn match sassPlaceholder "\%([{};]\s*\|^\s*\)\@<=%"   nextgroup=sassMixinName skipwhite | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | syn match sassFunctionName "[[:alnum:]_-]\+" contained nextgroup=sassCssAttribute | 
					
						
							|  |  |  | syn match sassFunctionDecl "\%([{};]\s*\|^\s*\)\@<=@function"   nextgroup=sassFunctionName skipwhite | 
					
						
							|  |  |  | syn match sassReturn "\%([{};]\s*\|^\s*\)\@<=@return" | 
					
						
							| 
									
										
										
										
											2008-07-13 17:41:49 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | syn match sassEscape     "^\s*\zs\\" | 
					
						
							|  |  |  | syn match sassIdChar     "#[[:alnum:]_-]\@=" nextgroup=sassId | 
					
						
							|  |  |  | syn match sassId         "[[:alnum:]_-]\+" contained | 
					
						
							|  |  |  | syn match sassClassChar  "\.[[:alnum:]_-]\@=" nextgroup=sassClass | 
					
						
							|  |  |  | syn match sassClass      "[[:alnum:]_-]\+" contained | 
					
						
							|  |  |  | syn match sassAmpersand  "&" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | " TODO: Attribute namespaces | 
					
						
							|  |  |  | " TODO: Arithmetic (including strings and concatenation) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-08-30 23:26:57 +02:00
										 |  |  | syn region sassMediaQuery matchgroup=sassMedia start="@media" end="[{};]\@=\|$" contains=sassMediaOperators | 
					
						
							|  |  |  | syn keyword sassMediaOperators and not only contained | 
					
						
							|  |  |  | syn region sassCharset start="@charset" end=";\|$" contains=scssComment,cssStringQ,cssStringQQ,cssURL,cssUnicodeEscape,cssMediaType | 
					
						
							| 
									
										
										
										
											2013-06-01 14:50:56 +02:00
										 |  |  | syn region sassInclude start="@import" end=";\|$" contains=scssComment,cssStringQ,cssStringQQ,cssURL,cssUnicodeEscape,cssMediaType | 
					
						
							| 
									
										
										
										
											2010-07-26 22:21:27 +02:00
										 |  |  | syn region sassDebugLine end=";\|$" matchgroup=sassDebug start="@debug\>" contains=@sassCssAttributes,sassVariable,sassFunction | 
					
						
							|  |  |  | syn region sassWarnLine end=";\|$" matchgroup=sassWarn start="@warn\>" contains=@sassCssAttributes,sassVariable,sassFunction | 
					
						
							| 
									
										
										
										
											2013-06-01 14:50:56 +02:00
										 |  |  | syn region sassControlLine matchgroup=sassControl start="@\%(if\|else\%(\s\+if\)\=\|while\|for\|each\)\>" end="[{};]\@=\|$" contains=sassFor,@sassCssAttributes,sassVariable,sassFunction | 
					
						
							|  |  |  | syn keyword sassFor from to through in contained | 
					
						
							| 
									
										
										
										
											2008-07-13 17:41:49 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | syn keyword sassTodo        FIXME NOTE TODO OPTIMIZE XXX contained | 
					
						
							| 
									
										
										
										
											2010-07-26 22:21:27 +02:00
										 |  |  | syn region  sassComment     start="^\z(\s*\)//"  end="^\%(\z1 \)\@!" contains=sassTodo,@Spell | 
					
						
							|  |  |  | syn region  sassCssComment  start="^\z(\s*\)/\*" end="^\%(\z1 \)\@!" contains=sassTodo,@Spell | 
					
						
							| 
									
										
										
										
											2016-08-30 23:26:57 +02:00
										 |  |  | syn match   sassEndOfLineComment "//.*" contains=sassComment,sassTodo,@Spell | 
					
						
							| 
									
										
										
										
											2008-07-13 17:41:49 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-08-30 23:26:57 +02:00
										 |  |  | hi def link sassEndOfLineComment        sassComment | 
					
						
							| 
									
										
										
										
											2008-07-13 17:41:49 +00:00
										 |  |  | hi def link sassCssComment              sassComment | 
					
						
							|  |  |  | hi def link sassComment                 Comment | 
					
						
							| 
									
										
										
										
											2010-07-26 22:21:27 +02:00
										 |  |  | hi def link sassDefault                 cssImportant | 
					
						
							|  |  |  | hi def link sassVariable                Identifier | 
					
						
							|  |  |  | hi def link sassFunction                Function | 
					
						
							| 
									
										
										
										
											2008-07-13 17:41:49 +00:00
										 |  |  | hi def link sassMixing                  PreProc | 
					
						
							|  |  |  | hi def link sassMixin                   PreProc | 
					
						
							| 
									
										
										
										
											2013-06-01 14:50:56 +02:00
										 |  |  | hi def link sassPlaceholder             PreProc | 
					
						
							| 
									
										
										
										
											2010-07-26 22:21:27 +02:00
										 |  |  | hi def link sassExtend                  PreProc | 
					
						
							| 
									
										
										
										
											2013-06-01 14:50:56 +02:00
										 |  |  | hi def link sassFunctionDecl            PreProc | 
					
						
							|  |  |  | hi def link sassReturn                  PreProc | 
					
						
							| 
									
										
										
										
											2008-07-13 17:41:49 +00:00
										 |  |  | hi def link sassTodo                    Todo | 
					
						
							| 
									
										
										
										
											2016-08-30 23:26:57 +02:00
										 |  |  | hi def link sassCharset                 PreProc | 
					
						
							|  |  |  | hi def link sassMedia                   PreProc | 
					
						
							|  |  |  | hi def link sassMediaOperators          PreProc | 
					
						
							| 
									
										
										
										
											2008-07-13 17:41:49 +00:00
										 |  |  | hi def link sassInclude                 Include | 
					
						
							| 
									
										
										
										
											2010-07-26 22:21:27 +02:00
										 |  |  | hi def link sassDebug                   sassControl | 
					
						
							|  |  |  | hi def link sassWarn                    sassControl | 
					
						
							| 
									
										
										
										
											2010-05-21 12:05:36 +02:00
										 |  |  | hi def link sassControl                 PreProc | 
					
						
							|  |  |  | hi def link sassFor                     PreProc | 
					
						
							| 
									
										
										
										
											2008-07-13 17:41:49 +00:00
										 |  |  | hi def link sassEscape                  Special | 
					
						
							|  |  |  | hi def link sassIdChar                  Special | 
					
						
							|  |  |  | hi def link sassClassChar               Special | 
					
						
							| 
									
										
										
										
											2010-07-26 22:21:27 +02:00
										 |  |  | hi def link sassInterpolationDelimiter  Delimiter | 
					
						
							| 
									
										
										
										
											2008-07-13 17:41:49 +00:00
										 |  |  | hi def link sassAmpersand               Character | 
					
						
							|  |  |  | hi def link sassId                      Identifier | 
					
						
							|  |  |  | hi def link sassClass                   Type | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | let b:current_syntax = "sass" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | " vim:set sw=2: |