Permalink
Browse files

Fixes #710: Empty block with CSS syntax

  • Loading branch information...
1 parent e259dd6 commit 128a79174387b99ce4b98f5af28a92e3e3683e8a @tonistiigi committed Jun 5, 2012
Showing with 6 additions and 3 deletions.
  1. +6 −1 lib/parser.js
  2. +0 −2 test/cases/control.boilerplate.css
View
@@ -306,7 +306,12 @@ Parser.prototype = {
var i = 0
, la;
while (la = this.lookahead(++i)) {
- if ('}' == la.type) break;
+ if ('}' == la.type) {
+ // Check empty block.
+ if (i == 2 || (i == 3 && this.lookahead(i - 1).type == 'space'))
+ return;
+ break;
+ }
if (':' == la.type) return;
}
}
@@ -286,8 +286,6 @@ button::-moz-focus-inner {
padding: 0;
}
/* Colors for form validity */
-input:valid,
-textarea:valid,
input:invalid,
textarea:invalid {
border-radius: 1px;

0 comments on commit 128a791

Please sign in to comment.