CSS optimizer for short form conversion?

Is there a free online or offline tool for optimizing all properties in an abbreviated form, where possible?

it would be useful to compress large files.

For instance:

it

.class {
padding-right: 10px;
padding-bottom: 15px;
padding-left: 20px;
}

to that

.class {
padding: 0 10px 15px 20px;
}
+3
source share
3 answers

Two CSS snippets are not identical. The second explicitly sets the top padding to zero, but the first does not set the top padding, so it inherits everything that was specified earlier.

For example, if you apply a class to a paragraph that already has indentation, in the first situation the paragraph will contain the top addendum, but in the second you will delete it.

, , , . CSS.

+2

Cleancss, -.

:

   Input: 0.096KB, Output: 0.038KB, Compression Ratio: 60.4% (-58 Bytes)
+3

Take a look at the YUI Compressor . A very useful tool from Yahoo .

0
source

Source: https://habr.com/ru/post/1782167/


All Articles