Skip to content

[css-shapes] Consider adding shape-outside: line-box #4003

Open
@jpamental

Description

@jpamental

I'd like to propose adding a new value to the shape-outside property of line-box. This would enable floating a title or other block of text and allowing text to wrap around it following the contour of that floated text. It would operate in a similar manner to shape-outside: <image> when the image has an alpha-channel transparency. It should also leverage shape-margin attributes as well.

While it's possible to achieve this using a polygon shape, adding line-box would mean it would work with any text rather than having to be custom-coded.

Examples
Screen Shot 2019-06-04 at 1 32 19 PM

Here is a CodePen example using shape-outside: <polygon> to mimic the effect:
https://codepen.io/jpamental/pen/LovYov

Here is a real-world example that is a bit more responsive:
https://rwt.io/blog/2018/10/georgia-my-mind

Shape-outside spec
https://drafts.csswg.org/css-shapes/#shape-outside-property

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