mattkenefick / vscode-css-alphabetize

Alphabetizes the properties of CSS structures

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

padding and margin should be placed before padding-xxx and margin-xxx

voidlps opened this issue · comments

Somebody may write CSS like this, to clear all padding then set only padding-top:

.only-padding-top {
padding: 0;
padding-top: 20px;
}

which will let padding-top effected.

using current version, it will be re-order as

.only-padding-top {
padding-top: 20px;
padding: 0;
}

the padding-top setting will be ignored in this order.

So recommend to make shorthand css attribute like padding, margin, background, border and so on be ordered at the beginning of other specified attribute.

Ack. Good idea.

Added this to 0.3.1 which should be going up soon.