thomaspierson / libcss2less

Css to LessCss converter library
GNU General Public License v3.0
213 stars 64 forks source link

Repeats same property when found duplicate selector #16

Open vin-ai opened 11 years ago

vin-ai commented 11 years ago

I tried:

#container-fluid,
#row-fluid,
#row-fluid > .span2,
#sidebar-nav,
#wrapper {
    height: 100%;
    min-height: 100%;
}

#container-fluid,
#row-fluid,
#row-fluid > .span2,
#sidebar-nav,
#wrapper {
    height: 100%;
    min-height: 100%;
}

#container-fluid,
#row-fluid,
#row-fluid > .span2,
#sidebar-nav,
#wrapper {
    height: 100%;
    min-height: 100%;
}

and it produces: here height and min-height is repeating thrice, because above same selector repeating thrice

#container-fluid,#row-fluid,#row-fluid &>.span2,#sidebar-nav,#wrapper {
    height: 100%;
    min-height: 100%;
    height: 100%;
    min-height: 100%;
    height: 100%;
    min-height: 100%;
}
rjmunro commented 10 years ago

Or, more simply:

#hello {
    color: blue;
}
#hello {
    color: blue;
}

produces:

#hello {
    color: blue;
    color: blue;
}

I don't think this is a bug. The root cause of the problem is that your original CSS is bad.