nested mixin filters ex. ::-webkit-input-placeholder

This commit is contained in:
jtm 2012-02-18 12:10:44 +00:00
parent 975b671c6e
commit a7e3040226
5 changed files with 29 additions and 1 deletions

View File

@ -290,6 +290,7 @@ class LessParser(object):
| css_id
| css_class
| dom_filter
| filter_group
| css_color
| less_combine
| '*'
@ -479,6 +480,7 @@ class LessParser(object):
"""
p[0] = [p[1], p[2]]
def p_filter_group_aux(self, p):
""" filter_group : filter filter
"""
@ -493,8 +495,10 @@ class LessParser(object):
def p_filter(self, p):
""" filter : css_filter
| ':' css_ident
| ':' css_vendor_property
| ':' css_filter
| ':' ':' css_ident
| ':' ':' css_vendor_property
"""
p[0] = list(p)[1:]

View File

@ -22,3 +22,9 @@
.content-em .column.blue .deep {
padding: 200px;
}
.div :-moz-placeholder {
color: #ffffff;
}
.div::-webkit-input-placeholder {
color: #ffffff;
}

View File

@ -5,4 +5,6 @@
.content-em{width:200px;}
.content-em .column{margin:200px;}
.content-em .column.blue{color:blue;}
.content-em .column.blue .deep{padding:200px;}
.content-em .column.blue .deep{padding:200px;}
.div :-moz-placeholder{color:#ffffff;}
.div::-webkit-input-placeholder{color:#ffffff;}

View File

@ -15,4 +15,19 @@
}
.content-em {
.nested-ruleset();
}
//
// filter mixins
//
.placeholder(@color: #000) {
:-moz-placeholder {
color: @color;
}
&::-webkit-input-placeholder {
color: @color;
}
}
.div {
.placeholder(#fff);
}

View File

@ -70,3 +70,4 @@
.foo .bar {
.bar;
}