├── README.md
├── css.html
├── css
├── index.html
├── script.js
└── test.css
├── html.html
├── test.css
└── test.html
/README.md:
--------------------------------------------------------------------------------
1 | MiniMinifier
2 | ==
3 |
4 | A collection of super tiny minifiers more efficient than most of the other online minifiers
5 |
6 | ---
7 |
8 | 128b CSS Minifier:
9 | ===
10 |
11 | ````
```` sometimes)
51 | - Warning: strings can be altered (ex: ```````` )
52 |
53 | - Benchmark:
54 |
55 | - **Our test file**: commented: 710b - willpeavy.com: 399b - [kangax](kangax.github.io/html-minifier): 273b - miniMinifier: 273b
56 |
57 | --
58 |
59 | Advanced CSS Minifier (1kb?):
60 | ===
61 |
62 | - Features:
63 |
64 | - remove charset rule
65 | - remove comments
66 | - keep strings and urls unaltered
67 | - remove spaces,tabs,line breaks around ~ ; , ( ) { } / @ ! < > =
68 | - remove spaces around : in at-rules
69 | - remove spaces before * and : in selectors, if possible
70 | - remove spaces around + and - in selectors
71 | - Remove all unnecessary * in selectors
72 | - remove spaces around * and : in rules
73 | - Remove spaces before hex colors
74 | - Remove spaces between ":" and "rgb()"
75 | - Remove all unnecessary semicolons
76 | - Remove "+" and leading zeroes in numbers
77 | - Remove ".0" in decimal numbers
78 | - Remove "0." in decimal numbers
79 | - Remove trailing zeroes in decimal numbers
80 | - Remove "-" before zero
81 | - Remove units after zero except %
82 | - Remove % after zero, except in parenthesis and keyframes stops
83 | - Remove "+", "-" and "." in "-.0", "+.0" and ".0"
84 | - Convert rgba(0,0,0,0) in transparent
85 | - Convert opaque rgba colors in rgb (ex: rgba(255, 0, 0, 1) => rgb(255, 0, 0))
86 | - Convert rgb colors in hex (ex: rgb(255, 0, 0) => #FF0000)
87 | - Minify 6-digit hex colors to 3-digit hex colors if possible (ex: #FF0000 => #F00)
88 | - Replace hex colors with shorter names (ex: #F00 => red)
89 | - Remove empty rules and empty media queries
90 | - Replace font-weight values with numbers
91 | - Simplify nth-of-type, nth-child, even, odd
92 | - Rename ":root" in "html"
93 | - Compress margin/padding/border-width/border-radius shorthands
94 | - Convert some units (angles, times, sizes)
95 | - Remove quotes around identifiers in font / font-family / etc (but not in content!)
96 | - Remove "https?:" and quotes in urls
97 | - Avoid repeating identical css properties in a rule
98 | - Lowercase everything but strings, urls and case-insensitive attr selectors (gzip optimization)
99 | - Remove repeated properties
100 | - Remove repeated selectors
101 | - Remove repeated rules
102 | - Don't close the last containers in the file
103 |
104 | - WIP:
105 |
106 | - Demo : http://xem.github.io/miniMinifier/css/index.html
107 | - Advanced test file (minified in the demo): https://github.com/xem/miniMinifier/blob/gh-pages/css/test.css
108 |
109 |
--------------------------------------------------------------------------------
/css.html:
--------------------------------------------------------------------------------
1 | 128b CSS minifier
2 |