Skip to content

Allow overriding single-shape border-shape color/width #13506

@noamr

Description

@noamr

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:

Image

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>>;

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions