The single-variant border-shape uses one of the border edges to select a border color and width.
This is usually OK, but in some cases it's counterintuitive, especially given that backgrounds are not painted outside the border box.
For example, take this shape from @una:
The stroke width here is 2px, but the "border" is closer to 20px.
To make this shape work nicely with the box model and its internal content, currently the author needs to add something like a 20px padding for it to paint correctly. But this is not what padding is for - it means that, for example, positioned elements would ignore the padding and would start at the 2,2 coordinate.
Proposal:
Allow border-shape-stroke and border-shape-stroke-width properties that override the defaults for the single-shape variant of border-shape, with a from-border default.
border-shape-stroke-color: from-border | <<color>>;
border-shape-stroke-width: from-border | <<line-width>>;
The single-variant
border-shapeuses one of the border edges to select a border color and width.This is usually OK, but in some cases it's counterintuitive, especially given that backgrounds are not painted outside the border box.
For example, take this shape from @una:
The stroke width here is
2px, but the "border" is closer to20px.To make this shape work nicely with the box model and its internal content, currently the author needs to add something like a
20pxpadding for it to paint correctly. But this is not whatpaddingis for - it means that, for example, positioned elements would ignore the padding and would start at the2,2coordinate.Proposal:
Allow
border-shape-strokeandborder-shape-stroke-widthproperties that override the defaults for the single-shape variant ofborder-shape, with afrom-borderdefault.