Allow variable-names beginning with a number
This commit is contained in:
@@ -140,6 +140,10 @@ class LessLexer:
|
||||
t.value = t.value.strip()
|
||||
return t
|
||||
|
||||
def t_less_variable(self, t):
|
||||
r'@\w+'
|
||||
return t
|
||||
|
||||
def t_css_color(self, t):
|
||||
r'\#[0-9]([0-9a-f]{5}|[0-9a-f]{2})'
|
||||
return t
|
||||
|
||||
@@ -48,3 +48,6 @@
|
||||
border-right: 1px solid transparent;
|
||||
border-top: 1px solid black;
|
||||
}
|
||||
.testname {
|
||||
width: 12px;
|
||||
}
|
||||
|
||||
1
lesscpy/test/css/variables.min.css
vendored
1
lesscpy/test/css/variables.min.css
vendored
@@ -11,3 +11,4 @@
|
||||
.scope1 .scope2 .scope3 .scope4{color:black;}
|
||||
.negvar{padding:-1px;}
|
||||
.varpad{border-left:1px solid transparent;border-right:1px solid transparent;border-top:1px solid black;}
|
||||
.testname{width:12px;}
|
||||
|
||||
@@ -133,4 +133,4 @@ footer, header, hgroup, menu, nav, section {
|
||||
@var: 3;
|
||||
(~".class_no_@{var}") {
|
||||
padding: @var * -1px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,3 +96,10 @@
|
||||
border-right: @a solid transparent;
|
||||
border-top: @a solid black;
|
||||
}
|
||||
/*
|
||||
Names
|
||||
*/
|
||||
@1col: 12px;
|
||||
.testname {
|
||||
width: @1col;
|
||||
}
|
||||
Reference in New Issue
Block a user