Skip to content
This repository

Fixes #710: Empty block with CSS syntax #712

Merged
merged 1 commit into from 10 months ago

2 participants

Tõnis Tiigi Roman Komarov
Tõnis Tiigi

No description provided.

Tobias Koppers sokra referenced this pull request June 05, 2012
Closed

testcase is wrong #710

Roman Komarov kizu merged commit 128a791 into from June 30, 2013
Roman Komarov kizu closed this June 30, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Jun 05, 2012
Tõnis Tiigi Fixes #710: Empty block with CSS syntax 128a791
This page is out of date. Refresh to see the latest.
7  lib/parser.js
@@ -306,7 +306,12 @@ Parser.prototype = {
306 306
         var i = 0
307 307
           , la;
308 308
         while (la = this.lookahead(++i)) {
309  
-          if ('}' == la.type) break;
  309
+          if ('}' == la.type) {
  310
+            // Check empty block.
  311
+            if (i == 2 || (i == 3 && this.lookahead(i - 1).type == 'space'))
  312
+              return;
  313
+            break;
  314
+          }
310 315
           if (':' == la.type) return;
311 316
         }
312 317
       }
2  test/cases/control.boilerplate.css
@@ -286,8 +286,6 @@ button::-moz-focus-inner {
286 286
   padding: 0;
287 287
 }
288 288
 /* Colors for form validity */
289  
-input:valid,
290  
-textarea:valid,
291 289
 input:invalid,
292 290
 textarea:invalid {
293 291
   border-radius: 1px;
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.