Despite the fact that your proposal is absolutely correct, the most concise form will be:
stlye1 { padding: 0 0 10px; }
This short hand format is split like padding: top(0) right(0) bottom(10px); and leaves the default values ββcorrect because the left value is not specified.
For 4 styles in your question, styles 1 and 3 are correct, but for styles 2 and 4 see style 5 below and the accompanying note.
For reference, a style transcript is broken down as follows:
If there is one value, it applies to all 4 attributes: top, right, bottom, and left.
stlye1value { padding: 10px; } stlye1value { padding-top: 10px; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; }
If there are two values, the first value refers to the upper and lower attributes, and the second value refers to the left and right
stlye2values { padding: 0 10px; } stlye2values { padding-top: 0; padding-right: 10px; padding-bottom: 0; padding-left: 10px; }
If there are 3 values, the first applies to the beginning, the second refers to the left and right, and the third refers to the bottom.
stlye3values { padding: 0 10px 20px; } stlye3values { padding-top: 0; padding-right: 10px; padding-bottom: 20px; padding-left: 10px; }
Setting all 4 values ββsets the complement in the order from the top, right, bottom, left (think of the circle clockwise, starting from the top).
stlye4values { padding: 0 10px 20px 30px; } stlye4values { padding-top: 0; padding-right: 10px; padding-bottom: 20px; padding-left: 30px; }
Note. It is not possible to specify the right or left value yourself using shorthand without entering all 4 values ββor using padding-left or padding-right .
style5 { padding-left: 10px; } style5 { padding: 0 0 0 10px; } stlye5 { padding:0; padding-left:10px; } stlye5 { padding-top: 0; padding-right: 0; padding-bottom: 0; padding-left: 10px; }