Padding/margin should use shorthand syntax with linked values

When using linked padding, either opposites or all, I would suspect that the CSS would be slimmed down accordingly.

Maybe its this way on purpose, just not seeing the logic.

When defining all 4 separately, I might expect to see 4 separate rules.

%root% {
    padding-left: XXX;
    padding-right: XXX;
    padding-top: XXX;
    padding-bottom: XXX;
}

But realistically why shouldn’t it be all in one padding: XXX XXX XXX XXX; format?

When moving to linked CSS, especially ALL I would expect the css to get simpler, such as

%root% {
    padding: XXX;
}

But its still gor 4 separate rules.

For opposites linked it would be best with a single as well no?

%root% {
    padding: XXX YYY;
}

Probably a small micro optimzation that makes very little final impact, but over the course of a full project that could be dozens or hundreds of extra lines.

1 Like