text/x-scss
*.scss
//
/*
*/
[a-z0-9_\x{80}-\x{10ffff}\\-]
#{
}
\$\%{css:identifier}
(
[+*%] |
(?<! \%{css:single-identifier-char} )
-
(?! \%{css:single-identifier-char} )
)
\+
(<=?|>=?|[=!]=)
and
not
or
false
true
null
&
\[
]
\(
\)
\(
\)
\(
\)
\.\.\.
url\(
\)
default
global
optional
{
}
(?(DEFINE)
(?<escape_interpolation_start> (?: \\ \#{ )+ )
(?<escape_comment_start> (?: \\ /[/*] )+ )
(?<escape> (?: \\ . )+ )
(?<interpolation_start_chars>
(?: (?: \# (?! { ) )+ | (?: (?<! \# ) { )+ )
)
(?<comment_start_chars>
(?: (?: (?<! / ) / (?! [/*] ) )+ | (?: (?<! / ) \* )+ )
)
(?<comment_end_chars>
(?: (?: \* (?! / ) )+ | (?: (?<! \* ) / )+ )
)
(?<single_line_comment> // .* )
(?<interpolation> # recursive subpattern to find matching braces
\#{
(?:
(?>
(?:
[^\\}#{(/*"']+ |
(?&escape_interpolation_start) |
(?&escape_comment_start) |
(?&escape) |
(?&interpolation_start_chars) |
(?&comment_start_chars)
)+
) |
(?&interpolation) |
(?&parentheses) |
(?&single_line_comment) |
(?&multiline_comment) |
(?&double_quote_string) |
(?&single_quote_string)
)*
}
)
(?<parentheses> # recursive subpattern to find matching parentheses
\(
(?:
(?>
(?:
[^\\)(#{/*"']+ |
(?&escape_interpolation_start) |
(?&escape_comment_start) |
(?&escape) |
(?&interpolation_start_chars) |
(?&comment_start_chars)
)+
) |
(?&interpolation) |
(?&parentheses) |
(?&single_line_comment) |
(?&multiline_comment) |
(?&double_quote_string) |
(?&single_quote_string)
)*
\)
)
(?<multiline_comment> # subpattern to find matching comment delimiters
/\*
(?:
(?>
(?:
[^*/#{]+ |
# no escapes
(?&comment_end_chars) |
(?&interpolation_start_chars)
)+
) |
(?&interpolation)
)*
\*/
)
(?<double_quote_string> # subpattern to find matching double quotes
"
(?:
(?>
(?:
[^\\"#{]+ |
(?&escape_interpolation_start) |
(?&escape) |
(?&interpolation_start_chars)
)+
) |
(?&interpolation)
)*
"
)
(?<single_quote_string> # subpattern to find matching single quotes
'
(?:
(?>
(?:
[^\\'#{]+ |
(?&escape_interpolation_start) |
(?&escape) |
(?&interpolation_start_chars)
)+
) |
(?&interpolation)
)*
'
)
)
:
(?:
(?! # not the start of a
\%{css:single-identifier-char} | # pseudo-class
[:\\] | # pseudo-element, escape
\#{ | # interpolation
/\* # comment
) | # or
(?= # ends like a normal declaration
(?>
(?:
(?>
(?:
[^\\;}{#(/*"']+ |
(?&escape_interpolation_start) |
(?&escape_comment_start) |
(?&escape) |
(?: \# (?! { ) )+ | # interpolation_start_chars allows {
(?&comment_start_chars)
)+
) |
(?&interpolation) |
(?&parentheses) |
(?&single_line_comment) |
(?&multiline_comment) |
(?&double_quote_string) |
(?&single_quote_string)
)*
)
\%{css:declaration-value-end} # with a semicolon or at the end of a block
)
)
\%{css:declaration-value-end}
@extend\%]
without
with
all
media
rule
supports
:
\%{css:test-value-end}
\(
\)
@at-root\%]
@(debug|warn|error)\%]
@(if|else\s+if)\%]
@else\%]
from
through
to
@for\%]
in
@each\%]
@while\%]
\(
\)
@mixin\%]
@include\%]
@content\%]
\(
\)
@function\%]
@return\%]
(&)(\%{css:identifier-chars}?)
%\%{css:identifier}
(?<=})\%{css:identifier-chars}