Skip to content

Commit

Permalink
Merge branch 'bug/coercion'
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Dec 7, 2011
2 parents b29396a + a819d85 commit 8b87161
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/nodes/unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Unit.prototype.clone = function(){
*/

Unit.prototype.operate = function(op, right){
var type = this.type || right.type;
var type = this.type || right.first.type;

// swap color
if ('rgba' == right.nodeName || 'hsla' == right.nodeName) {
Expand Down
9 changes: 9 additions & 0 deletions test/cases/regression.480.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
body {
foo: 25px;
foo: 25px;
}
body {
foo: 10em;
foo: 10em;
foo: 10px;
}
12 changes: 12 additions & 0 deletions test/cases/regression.480.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
n = 5px

body
foo: n * 5
foo: 5 * n

n = 5em 5px 5

body
foo: n * 2
foo: 2 * n
foo: 2px * n

0 comments on commit 8b87161

Please sign in to comment.