[csswg-drafts] [css-shapes][css-masking] shape-outside:auto

bradkemper has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-shapes][css-masking] shape-outside:auto ==
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.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2180 using your GitHub account

Received on Thursday, 11 January 2018 07:54:42 UTC