chiark / gitweb /
css: strip trailing comments also for lines with variables.
authorVladimír Vondruš <mosra@centrum.cz>
Wed, 13 Jun 2018 21:55:57 +0000 (23:55 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Sun, 17 Jun 2018 11:06:50 +0000 (13:06 +0200)
I am back at 8.9 kB, yay!

css/m-dark+doxygen.compiled.css
css/m-dark.compiled.css
css/m-light+doxygen.compiled.css
css/m-light.compiled.css
css/postprocess.py

index 83008da9e384438cb875615bbb0019e21d35748d..252a16d165640786469141c51b20ffbc4f23a8c4 100644 (file)
@@ -440,7 +440,7 @@ blockquote, hr {
   border-color: #405363;
 }
 pre {
-  font-family: 'Source Code Pro', monospace, monospace, monospace; /* https://en.wikipedia.org/wiki/User:Davidgothberg/Test59 */
+  font-family: 'Source Code Pro', monospace, monospace, monospace;
   font-size: 0.9rem;
   padding: 0.5rem 1rem;
   color: #e6e6e6;
@@ -1122,7 +1122,7 @@ figure.m-figure.m-dim a:hover, figure.m-figure.m-dim a:focus, figure.m-figure.m-
   color: #747474;
 }
 .m-imagegrid > div {
-  background-color: #2f363f; /* to avoid section HL shining through */
+  background-color: #2f363f;
 }
 .m-imagegrid > div > figure {
   display: block;
index c295debff9344d9d8117e08e1f4b2afe531bf303..ee86e350f182f3b619a06416ab4e6336ada5e7e2 100644 (file)
@@ -440,7 +440,7 @@ blockquote, hr {
   border-color: #405363;
 }
 pre {
-  font-family: 'Source Code Pro', monospace, monospace, monospace; /* https://en.wikipedia.org/wiki/User:Davidgothberg/Test59 */
+  font-family: 'Source Code Pro', monospace, monospace, monospace;
   font-size: 0.9rem;
   padding: 0.5rem 1rem;
   color: #e6e6e6;
@@ -1122,7 +1122,7 @@ figure.m-figure.m-dim a:hover, figure.m-figure.m-dim a:focus, figure.m-figure.m-
   color: #747474;
 }
 .m-imagegrid > div {
-  background-color: #2f363f; /* to avoid section HL shining through */
+  background-color: #2f363f;
 }
 .m-imagegrid > div > figure {
   display: block;
index ec48a040ad0b945fa7263e71ea3a7c2aa8ec457f..835c9e287cfde6d5551aaf9ee4c174832d810135 100644 (file)
@@ -440,7 +440,7 @@ blockquote, hr {
   border-color: #f7e3db;
 }
 pre {
-  font-family: 'Source Code Pro', monospace, monospace, monospace; /* https://en.wikipedia.org/wiki/User:Davidgothberg/Test59 */
+  font-family: 'Source Code Pro', monospace, monospace, monospace;
   font-size: 0.9rem;
   padding: 0.5rem 1rem;
   color: #5b5b5b;
@@ -1122,7 +1122,7 @@ figure.m-figure.m-dim a:hover, figure.m-figure.m-dim a:focus, figure.m-figure.m-
   color: #949494;
 }
 .m-imagegrid > div {
-  background-color: #ffffff; /* to avoid section HL shining through */
+  background-color: #ffffff;
 }
 .m-imagegrid > div > figure {
   display: block;
index 4b766f428051e8ef3a0b4f164a63cfbaa15242de..e5c82ae5b75050391a28c2442588998c9acb0f6b 100644 (file)
@@ -440,7 +440,7 @@ blockquote, hr {
   border-color: #f7e3db;
 }
 pre {
-  font-family: 'Source Code Pro', monospace, monospace, monospace; /* https://en.wikipedia.org/wiki/User:Davidgothberg/Test59 */
+  font-family: 'Source Code Pro', monospace, monospace, monospace;
   font-size: 0.9rem;
   padding: 0.5rem 1rem;
   color: #5b5b5b;
@@ -1122,7 +1122,7 @@ figure.m-figure.m-dim a:hover, figure.m-figure.m-dim a:focus, figure.m-figure.m-
   color: #949494;
 }
 .m-imagegrid > div {
-  background-color: #ffffff; /* to avoid section HL shining through */
+  background-color: #ffffff;
 }
 .m-imagegrid > div > figure {
   display: block;
index 7ca4362da4aa679fdaedc6aafae2e19c0905e88d..78d822bf2bfc48e04a3c7b4252eb8daf119566fe 100755 (executable)
@@ -73,7 +73,11 @@ def postprocess(files, process_imports, out_file):
             if match and match['key'] in variables:
                 out.write(match['before'])
                 out.write(variables[match['key']])
-                out.write(match['after'])
+                # Strip the trailing comment, if there, to save some bytes
+                if match['after'].endswith('*/'):
+                    out.write(match['after'][:match['after'].rindex('/*')].rstrip())
+                else:
+                    out.write(match['after'])
                 out.write("\n")
                 continue