cloudhead/less.js — Issue #435: bubble selector
Author: Punk-UnDeaD
Created: 2011-10-27 17:49:48+00:00
State: open

.foo{
html.ua-ie-7{
color:red;
html.front{color:green;}
}
}

html.ua-ie-7 .foo{color:red}
html.front.ua-ie-7 .foo{color:red}

tags html and body can not be in the middle of the selector
they should float to the top
Now they can

1.1.3
***less.original.js	2011-06-10 18:09:09.000000000 +0300
--- less.js	2011-06-29 17:38:20.000000000 +0300
***************
*** 2232,2240 ****
} else {
if (rules.length > 0) {
selector = paths.map(function (p) {
! return p.map(function (s) {
! return s.toCSS(env);
! }).join('').trim();
}).join(env.compress ? ',' : (paths.length > 3 ? ',\n' : ', '));
css.push(selector,
(env.compress ? '{' : ' {\n ') +
--- 2232,2252 ----
} else {
if (rules.length > 0) {
selector = paths.map(function (p) {
!	var body=[];
!	var html=[];
!	var b=p.map(function (s) {return s.toCSS(env);});
!	var bodyre = / body([\.|\#|\[].+)/;
!	var htmlre = / html([\.|\#|\[].+)/;
!	for (var key=0;key 3 ? ',\n' : ', '));
css.push(selector,
(env.compress ? '{' : ' {\n ') +