wok-6.x diff rcssmin/description.txt @ rev 22126

updated wget (1.19.5 -> 1.20.3)
author Hans-G?nter Theisgen
date Mon Nov 04 10:12:01 2019 +0100 (2019-11-04)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/rcssmin/description.txt	Mon Nov 04 10:12:01 2019 +0100
     1.3 @@ -0,0 +1,50 @@
     1.4 +RCSSmin is a CSS minifier written in Python.
     1.5 +
     1.6 +The minifier is based on the semantics of the YUI compressor, which itself is
     1.7 +based on the rule list by Isaac Schlueter.
     1.8 +
     1.9 +This module is a re-implementation aiming for speed instead of maximum
    1.10 +compression, so it can be used at runtime (rather than during a preprocessing
    1.11 +step). RCSSmin does syntactical compression only (removing spaces, comments and
    1.12 +possibly semicolons). It does not provide semantic compression (like removing
    1.13 +empty blocks, collapsing redundant properties etc). It does, however, support
    1.14 +various CSS hacks (by keeping them working as intended).
    1.15 +
    1.16 +Here's a feature list:
    1.17 +
    1.18 +  - Strings are kept, except that escaped newlines are stripped
    1.19 +  - Space/Comments before the very end or before various characters are
    1.20 +    stripped: ``:{});=>],!`` (The colon (``:``) is a special case, a single
    1.21 +    space is kept if it's outside a ruleset.)
    1.22 +  - Space/Comments at the very beginning or after various characters are
    1.23 +    stripped: ``{}(=:>[,!``
    1.24 +  - Optional space after unicode escapes is kept, resp. replaced by a simple
    1.25 +    space
    1.26 +  - whitespaces inside ``url()`` definitions are stripped
    1.27 +  - Comments starting with an exclamation mark (``!``) can be kept optionally.
    1.28 +  - All other comments and/or whitespace characters are replaced by a single
    1.29 +    space.
    1.30 +  - Multiple consecutive semicolons are reduced to one
    1.31 +  - The last semicolon within a ruleset is stripped
    1.32 +  - CSS Hacks supported:
    1.33 +
    1.34 +    - IE7 hack (``>/**/``)
    1.35 +    - Mac-IE5 hack (``/*\*/.../**/``)
    1.36 +    - The boxmodelhack is supported naturally because it relies on valid CSS2
    1.37 +      strings
    1.38 +    - Between ``:first-line`` and the following comma or curly brace a space is
    1.39 +      inserted. (apparently it's needed for IE6)
    1.40 +    - Same for ``:first-letter``
    1.41 +
    1.42 +rcssmin.c is a reimplementation of rcssmin.py in C and improves runtime up to
    1.43 +factor 100 or so (depending on the input). docs/BENCHMARKS in the source
    1.44 +distribution contains the details.
    1.45 +
    1.46 +The module additionally provides a "streamy" interface:
    1.47 +
    1.48 +$ python -mrcssmin <css >minified
    1.49 +
    1.50 +It takes two options:
    1.51 +
    1.52 +  -b  Keep bang-comments (Comments starting with an exclamation mark)  
    1.53 +  -p  Force using the python implementation (not the C implementation)