csso icon indicating copy to clipboard operation
csso copied to clipboard

Don't compress font* and other

Open Pahom-ka opened this issue 4 years ago • 1 comments

Don't compressed font* attributes. For example this: font-family:RobotoRegular,sans-serif;font-size:14px; length: 52 symbols compact equivalent: font:14px RobotoRegular,sans-serif; length: 35 symbols padding, margin, border similarly

yet maybe compress this: margin-bottom: 15px; length: 21 symbols to this margin: 0 0 15px; length: 18 symbols

I sew issue about unsafe optimization, but i think, that it's is safe optimization within the selector.

Pahom-ka avatar Aug 10 '21 12:08 Pahom-ka

That's definitely unsafe optimisations, since shorthands override other declarations e.g.:

.foo {
    margin: 10px;
}
.foo__selected {
    margin-top: 20px;
}

If these classes are applied to a single element (<div class="foo foo__selected">) and you replace margin-top -> margin, then you'll get margins 20px 0 0 instead of 20px 10px 10px...

lahmatiy avatar Jul 14 '22 09:07 lahmatiy