- From: Amelia Bellamy-Royds via GitHub <sysbot+gh@w3.org>
- Date: Mon, 12 Mar 2018 03:32:00 +0000
- To: public-css-archive@w3.org
I definitely like the idea of having ways to avoid repeating values in `shape-outside`. However, there are a number of possibilities, so I think the keywords could be more precise than `auto`: ``` shape-outside: clip-path; /* use this element's clip-path shape */ shape-outside: mask; /* use the composited mask-image layers as an image value */ shape-outside: content; /* use the rendered content of this element as an image value */ ``` That last one is something I've often wanted, for `shape-outside` around an `<img>` element, without having to load the image URL in both the markup and the CSS. (There's an example in the spec that uses `attr(src, url)` but no one seems interested in implementing that & it wouldn't work with <picture> or with inline SVG, anyway.) Of course, defining layout based on the content image would require the image or other element content to be CORS-friendly, just like with image values passed directly to `shape-outside`. That's easy enough to do with an attribute on `<img>`, but for re-using `mask-image`, it would depend on the ability to upgrade the `mask-image` request with a crossorigin URL option (see #1603). Currently, image values for `mask-image` (as opposed to SVG mask references) don't need to have CORS permissions. The `clip-path` and `mask-image` values could also be used for `shape-inside`. (FYI, `shape-outside` defines how other content wraps around this element, `shape-inside` defines an outer wrapping boundary for the flow content _inside_ this element. So a `content` option doesn't work there.) -- GitHub Notification of comment by AmeliaBR Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2180#issuecomment-372184805 using your GitHub account
Received on Monday, 12 March 2018 03:32:02 UTC