Skip to content

[css-shapes][css-masking] shape-outside:auto #2180

@bradkemper

Description

@bradkemper

I’d like to propose a new auto value for shape-outside. How it would work, when you have shape-outside:auto:

  • if clip path has a valid value that is not none, then that clipping path is used to define the float area shape, as if it was a polygon that exactly coincided with the path shape and position of the clipping path.
  • if mask-image and/or mask-border-source has a valid value that is not none, then the resulting alpha channel representing the, after all compositing done, is used as if it was the alpha channel of an <image> value for shape-inside.
  • If there is both a clip path AND mask, as above, then the intersection of the clipping region and the masked area alpha channel (as above) is used as the alpha channel of an <image> for shape-inside.

In this way, paths and/or images used for clipping and/or masking do not need to be repeated in the CSS in order to also be used for the float area shape. There is also less chance for error if the path or image values need to be edited. A background or internal content makes a clipped/masked shape visible, and shape-outside:auto lets in-line content flow around it. shape-image-threshold and shape-margin would work as normal to refine how that happens.

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