text/less;text/x-less
*.less
//
/*
*/
[a-z0-9_-]
(?: ; | (?= \} ) )
(?: @ \%{css:identifier-regex} )
\%{variable-regex}
@\{
\}
@@\%{css:identifier-regex}
\$\%{css:identifier-regex}
@arguments\%]
@\{arguments\}
(
[+*/] |
(?<! \%{css:single-identifier-char-regex} )
-
(?! \%{css:single-identifier-char-regex} )
)
true
~"
"
~'
'
\{
\}
\)
\%{variable-regex}\(
\%{statement-end}
\(
\)
\(
\)
%\(
\)
url\(
\)
(?(DEFINE)
(?<interpolation> # recursive subpattern to find matching brackets
@\{
(?:
(?>
(?:
[^@{}]+ |
(?! @\{ | \} ) .
)+
) |
(?&interpolation)
)*
\}
)
)
(
\+_?: | # property merge
:
(?:
(?! # not the start of a
\%{css:single-identifier-char-regex} | # pseudo-class
[:\\] | # pseudo-element, escape
@\{ # variable interpolation
) | # or
(?= # ends like a normal declaration
(?>
(?:
[^;}{@]+ |
(?&interpolation)+ |
\@+
)*
)
\%{css:declaration-value-end} # with a semicolon or at the end of a block
)
)
)
\%{css:declaration-value-end}
(?<=@plugin)\s*(\()
\)
@plugin\%]
(?=\%{css:identifier-regex}\()
\%{statement-end}
css
inline
less
multiple
once
optional
reference
(?<=@import)\s*(\()
\)
@import\%]
\.\.\.
\(
\)
and
not
or
(>=?|=<?|<)
\(
\)
\%[when\%]
(?=\{)
(&)(\%{css:identifier-chars-regex}?)
(?<=\})\%{css:identifier-chars-regex}
:
extend
all
(?<=:extend)\(
\)
(?=&:extend\()
\%{statement-end}