-
Notifications
You must be signed in to change notification settings - Fork 757
Open
Labels
Description
I’d like to propose a new auto value for shape-outside. How it would work, when you have shape-outside:auto:
- if
clip pathhas a valid value that is notnone, 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-imageand/ormask-border-sourcehas a valid value that is notnone, then the resulting alpha channel representing the, after all compositing done, is used as if it was the alpha channel of an<image>value forshape-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>forshape-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.
JoshuaLindquist and SebastianZ