Allow composite identifiers through combinators
This commit is contained in:
@@ -518,6 +518,11 @@ class LessParser(object):
|
||||
"""
|
||||
p[0] = p[1]
|
||||
|
||||
def p_ident_part_aux(self, p):
|
||||
""" ident_part : combinator vendor_property
|
||||
"""
|
||||
p[0] = [p[1], p[2]]
|
||||
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
|
||||
@@ -211,3 +211,9 @@ section {
|
||||
.class_no_3 {
|
||||
padding: -3px;
|
||||
}
|
||||
.label-important, .badge-important {
|
||||
background-color: #ff0000;
|
||||
}
|
||||
.label-important[href], .badge-important[href] {
|
||||
background-color: #cc0000;
|
||||
}
|
||||
|
||||
2
lesscpy/test/css/identifiers.min.css
vendored
2
lesscpy/test/css/identifiers.min.css
vendored
@@ -33,3 +33,5 @@ article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{pa
|
||||
#f7{color:#fff777;}
|
||||
.asterisk_last *{padding:0;}
|
||||
.class_no_3{padding:-3px;}
|
||||
.label-important,.badge-important{background-color:#ff0000;}
|
||||
.label-important[href],.badge-important[href]{background-color:#cc0000;}
|
||||
|
||||
@@ -134,3 +134,12 @@ footer, header, hgroup, menu, nav, section {
|
||||
(~".class_no_@{var}") {
|
||||
padding: @var * -1px;
|
||||
}
|
||||
/*
|
||||
|
||||
*/
|
||||
.label,
|
||||
.badge {
|
||||
// Composite identifiers
|
||||
&-important { background-color: #F00; }
|
||||
&-important[href] { background-color: darken(#F00, 10%);}
|
||||
}
|
||||
Reference in New Issue
Block a user