Re: [csswg-drafts] [css-shapes] Remove padding-box, content-box values from <shape-box>. (#3872)

I would be very disappointed if we just removed these values, as that would prevent authors from aligning shapes with actual content elements or with content or padding-clipped background.

(Note that the `<shape-box>` value has two effects: it can define the shape directly, OR it can act as a reference box for aligning and scaling shapes defined by images or the shape functions.)

But, it is clear that we have unspecified behavior. We need rules for what happens in scrolling containers. Maybe what should happen is that shapes aligned to these boxes instead gets treated as border box at used value time if the element has scrollable overflow.

Regarding the use counter: current usage of `shape-outside` is often limited by support for `clip-path`. A [`clip-path` is also supposed to support many reference boxes](https://drafts.fxtf.org/css-masking-1/#the-clip-path), but Chrome does not support it. Chrome only supports the default `border-box`, so if you want a `shape-outside` shape to match a `clip-path` shape, you currently need to make your `shape-outside` shape reference `border-box`.

Of course, this also means that any decisions about reference boxes at scrollable elements should affect `clip-path`, too. Which means, they should also probably affect [`mask-origin`](https://drafts.fxtf.org/css-masking-1/#the-mask-origin), which defines reference boxes for masked elements. But `mask-origin` is intentionally designed to be consistent with `background-origin`, and backgrounds in scrollable containers apply to the inside dimensions, not the outside dimensions that are used for the float wrapping area, which is what `shape-outside` relates to…

In other words, we're not going to define a rule that is consistent everywhere when it comes to scrollable elements. But that doesn't mean that we should prevent authors from using these properties in a consistent way on _non_ scrolling elements.

-- 
GitHub Notification of comment by AmeliaBR
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3872#issuecomment-488332091 using your GitHub account

Received on Wednesday, 1 May 2019 16:25:31 UTC