text/less;text/x-less
*.less
//
/*
*/
[a-z0-9_-]
(?: ; | (?= } ) )
(?: @ \%{css:identifier} )
\%{variable}
@{
}
@@\%{css:identifier}
\$\%{css:identifier}
@arguments\%]
@{arguments}
(
[+*/] |
(?<! \%{css:single-identifier-char} )
-
(?! \%{css:single-identifier-char} )
)
true
~"
"
~'
'
{
}
\)
\%{variable}\(
\%{statement-end}
\(
\)
\(
\)
%\(
\)
url\(
\)
(?(DEFINE)
(?<interpolation> # recursive subpattern to find matching brackets
@{
(?:
(?>
(?:
[^@{}]+ |
(?! @{ | } ) .
)+
) |
(?&interpolation)
)*
}
)
)
(
\+_?: | # property merge
:
(?:
(?! # not the start of a
\%{css:single-identifier-char} | # 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}\()
\%{statement-end}
@charset\%]
css
inline
less
multiple
once
optional
reference
(?<=@import)\s*(\()
\)
@import\%]
\.\.\.
\(
\)
and
not
or
(>=?|=<?|<)
\(
\)
\%[when\%]
(?={)
(&)(\%{css:identifier-chars}?)
(?<=})\%{css:identifier-chars}
:
extend
all
(?<=:extend)\(
\)
(?=&:extend\()
\%{statement-end}