nzakas / cssembed

A tool for embedding data URIs in CSS files.
http://www.nczonline.net/
389 stars 30 forks source link

Skipping per line #40

Open gbakernet opened 12 years ago

gbakernet commented 12 years ago

CSSEmbed assumes that there will be one url() and one SKIP directive per line in the source file. When a CSS file is compressed onto all-in-one line, the single SKIP directive will cause CSSEmbed to skip every url in the file.

In the following example, all url's will be skipped

.class1{background:url(image1.png);/*!CSSEmbed:SKIP*/}.class2{background:url(image2.png);}.class3{background:url(image3.png);}

Note that the CSS comments would need to be preserved by the compression tool.

The same applies to compact writing form, both urls will be skipped in this example

.class1 { background:url(image1.png) /*!CSSEmbed:SKIP*/; margin: 0px; cursor: url(cursor1.png) 4 12, auto; }