Avatar

Default CSS (Without Minimization) (Design/Themes)

by Auge ⌂, Monday, November 10, 2014, 11:39 (3448 days ago) @ Alfie
edited by Auge, Monday, December 15, 2014, 22:47

Hello

Don’t forget what’s given on its top:
/***********************************************************************
* NOTICE: In order to reduce bandwidth usage, a minimized version of   *
* this stylesheet is used by default (style.min.js). Changes in this   *
* file do not have any effect unless it is loaded by the template      *
* (main.tpl).                                                          *
* The minimized version was created with the YUI Compressor            *
* <http://developer.yahoo.com/yui/compressor/>.                        *
***********************************************************************/

Some additionally thoughts:

What does the minification? It replaces line breaks with blanks and merges multiple spaces to single ones.

/* source */
body {
  background: #ffffff;
  color: #000000;
  margin: 0;
  padding: 0;
}
 
/* minified */
body { background: #ffffff; color: #000000; margin: 0; padding: 0; }

Alex uses the linked tool yui-compressor. One can her- or himself minify the source with a capable editor. As said above, it is only necessary to replace line breaks with blanks and merge multiple spaces into one space in a second step. If the editor can search for control chars one can minify the source without an additional tool.

Search for "\r\n" or "\n" (OS dependant [1]), replace with " ". Search for multiple spaces with a regular expression (if possible) or with "  " (two spaces, maybe it needs multiple cycles). That should do the job.

[1] Searching for "\r" as MacOS line break for versions < 10 is (in Borg style) futile.

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!


Complete thread:

 RSS Feed of thread