Skip to content

[css-backgrounds] possible examples/diagrams for border-image #7608

@jsnkuhn

Description

@jsnkuhn

The border-image spec (https://drafts.csswg.org/css-backgrounds/#border-image) is currently light on examples. I wonder if some practice use cases would help folks understand what border-image is used for and maybe use it more?

here's a common corners only pattern Using SVG: https://codepen.io/jsnkuhn/pen/XWEpxVM?editors=1100

Screenshot 2022-07-30 at 08-30-02 XWEpxVM

Gradient examples:

I don't think that gradient as border-image-source was always possible cross browser? This might explain the lack of examples. But pretty sure it has consistent support now

borders on just top and bottom: https://codepen.io/jsnkuhn/pen/VwzZVEP

Screenshot 2022-07-30 at 08-46-52 VwzZVEP

repeating linear gradient barber pole left border: https://codepen.io/jsnkuhn/pen/WNRrYV?editors=0110

Screenshot 2022-07-30 at 08-56-04 Repeating-linear-gradient border-image

border-image-outset: https://codepen.io/jsnkuhn/pen/ZGodKB?editors=1100

border-image-outset

border-image shorthand with labels: https://codepen.io/jsnkuhn/pen/eWzpyz

border-image-shorthand-labeled

border-image shorthand area has no examples right now....

Should probably be similar to how background shorthand area in spec (https://drafts.csswg.org/css-backgrounds/#background) is handled

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions