I’ve searched the W3C CSS2 Spec for the name of the feature that allows us to shrink duplicate values down to one or two like:
margin: 1px 1px 1px 1px; -> margin: 1px;
padding: 1px 1px 2px 2px; -> padding: 1px 2px;
But I’m still not sure what the exact name for this is. Does anyone know what this is called? Also, can you list some other properties that follow this behavior (besides the obvious ones like margin, padding, and border-radius). I’m writing a regex that matches these properties and would like to include as many them as possible!
Thanks!
marginis a shorthand property formargin-left,margin-top, etc.margin: 1px 1px 1px 1px;andmargin: 1px;are both shortcuts. In the later one for values collapsed into one. So collapsing probably.As of other shorthands:
sizeproperty (from printing module)border-width,border-colorandborder-stylebackground-position,background-size, etc.