Fix UI to fit smaller screens better. Add a couple more todo items.
authorJuriy Zaytsev <kangax@gmail.com>
Mon, 8 Feb 2010 16:33:34 +0000 (11:33 -0500)
committerJuriy Zaytsev <kangax@gmail.com>
Mon, 8 Feb 2010 16:33:34 +0000 (11:33 -0500)
index.html
master.css
tests/index.html

index f05e356..9b1dbe4 100644 (file)
@@ -28,8 +28,8 @@
               <label for="collapse-boolean-attributes">
                 Collapse boolean attributes
                 <br>
-                <span class="quiet">
-                  (e.g. <code>&lt;input disabled="disabled"&gt; &rarr; &lt;input disabled&gt;</code>)
+                <span class="quiet short">
+                  (e.g. <code>&lt;... disabled="disabled"&gt; &rarr; &lt;... disabled&gt;</code>)
                 </span>
               </label>
             </li>
             </li>
             <li>
               <input type="checkbox" id="use-short-doctype" checked>
-              <label for="use-short-doctype">
+              <label for="use-short-doctype" title="i.e. <!DOCTYPE html>">
                 Use short doctype
-                <br>
-                <code class="quiet">&lt;!DOCTYPE html&gt;</code>
               </label>
             </li>
             <li>
@@ -68,7 +66,9 @@
               <label for="remove-empty-attributes">
                 Remove empty (or blank) attributes
                 <br>
-                <code class="quiet">Valid combinations are: class, id, style, title, lang, dir, event attributes</code>
+                <span class="quiet short">
+                  Valid attributes are: class, id, style, title, lang, dir, event attributes
+                </span>
               </label>
             </li>
           </ul>
         <ul>
           <li>Write unit tests for minifier (!)</li>
           <li>Detect empty elements (not just attributes)</li>
+          <li>Detect repeating attributes (e.g. multiple styles)</li>
           <li>Report deprecated (or presentational) attributes (e.g.: <code>&lt;td width="..." height="..."></code>)</li>
           <li>Add option to collapse all whitespace to 1 character, instead of completely removing it (to preserve empty text nodes)</li>
           <li>Figure out when it is safe to remove optional closing tags, so that it doesn't affect document tree</li>
           <li>Do not strip IE conditional comments</li>
           <li>Remove as many empty/blank attributes as possible (not just core ones)</li>
+          <li>Add option to remove comments/CDATA sections from scripts/styles</li>
           <li>Parser trips over xml declarations (need to ignore or strip them)</li>
           <li>Generate a report of all applied transformations</li>
         </ul>
index 2bce1ec..38b0d46 100644 (file)
@@ -18,4 +18,5 @@ button { font-weight: bold; width: 100px; }
 
 .success { color: green; }
 .failure { color: red; }
-.quiet { font-size: 0.85em; color: #888; }
\ No newline at end of file
+.quiet { font-size: 0.85em; color: #888; }
+.short { display: inline-block; width: 20em; margin-top: 0.25em; }
\ No newline at end of file
index 2799d16..d142071 100644 (file)
         });
         
         test('empty attributes', function(){
-          var input = '<p id="" class="" style=" " title="\n" lang="" dir="">x</p>';
+          var input = '<p id="" class="" STYLE=" " title="\n" lang="" dir="">x</p>';
           equals(minify(input, { shouldRemoveEmptyAttributes: true }), '<p>x</p>');
           
-          input = '<p onclick=""   ondblclick=" " onmousedown="" onmouseup="" onmouseover=" " onmousemove="" onmouseout="" '+
+          input = '<p onclick=""   ondblclick=" " onmousedown="" ONMOUSEUP="" onmouseover=" " onmousemove="" onmouseout="" '+
                   'onkeypress=\n\n  "\n     " onkeydown=\n"" onkeyup\n="">x</p>';
           equals(minify(input, { shouldRemoveEmptyAttributes: true }), '<p>x</p>');