Skip to content

Commit

Permalink
Fixed postfix conditional cloning. Closes stylus#535
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Jan 20, 2012
1 parent 5159d3e commit 6c24a9d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/nodes/if.js
Expand Up @@ -49,6 +49,7 @@ If.prototype.clone = function(){
var clone = new If(cond, block);
clone.elses = this.elses.map(function(node){ return node.clone(); });
clone.negate = this.negate;
clone.postfix = this.postfix;
clone.lineno = this.lineno;
clone.filename = this.filename;
return clone;
Expand Down
3 changes: 3 additions & 0 deletions test/cases/regression.535.css
@@ -0,0 +1,3 @@
body input[type=file] {
color: #f00;
}
9 changes: 9 additions & 0 deletions test/cases/regression.535.styl
@@ -0,0 +1,9 @@
color-file(color = null)
input[type=file]
color: color if color

body
color-file: red

form
color-file: false

0 comments on commit 6c24a9d

Please sign in to comment.