Corners, four at a time or one
With the shorthand collapsed as far as it will go, because 8px is easier to maintain than 8px 8px 8px 8px.
Corners, four at a time or one
With the shorthand collapsed as far as it will go, because 8px is easier to maintain than 8px 8px 8px 8px.
When a radius is bigger than the box
Ask for a 60px radius on a corner of a 60px-wide element and you will not get it. The two radii meeting along a side cannot together exceed the length of that side, and rather than clipping one corner and leaving the rest, CSS scales every radius on the element down by whatever single factor makes them all fit.
The behaviour is sensible and the symptom is confusing: change one corner and all four visibly change, including corners you did not touch. If a shape stops responding proportionally to the number you are typing, this is almost always why, and the fix is either a smaller radius or a larger box.
Nesting: the inner radius is not the outer one
Put a rounded card inside a rounded container with padding between them, give both the same radius, and the corners will not look concentric — the inner curve appears too tight, as though it were pinched. The eye is right. For two curves to stay parallel, the inner radius has to be the outer radius minus the gap between them: an outer 16px with 8px of padding wants an inner 8px.
It is one of the details that separates an interface that looks assembled from one that looks drawn, and it costs nothing but the subtraction. Where the padding is larger than the outer radius the answer goes to zero rather than negative, and a square inner corner is correct.
Percentages behave differently
A percentage radius is relative to the box's own width for the horizontal component and its height for the vertical one. The same value therefore gives a different shape on a different-sized element — which is exactly what you want for a pill or a circle and exactly what you do not want for a card.
50% on every corner gives an ellipse that follows the box. For a pill, a large px value clamped by the browser is more predictable.
The shorthand's order
One value applies to all four corners. Two are top-left/bottom-right then top-right/bottom-left. Three are top-left, then the two remaining diagonals, then bottom-right. Four go clockwise from top-left.
This collapses to the shortest form that means the same thing, which is what you would write by hand and what is easiest to change later.