Re: [csswg-drafts] [css-shapes-2][css-borders-4] Add a way to change an element's shape (#6997)

I understand the motivation for the single path syntax taking its widths from `border-width`, but I think in practice this is going to be pretty hard to implement. The proposal to inset the path by taking a perpendicular line at each point whose length is an interpolated width is interesting, but may result in a generated path with thousands of points; both the computation and rendering could be slow. Perhaps there's a way to do something similar with a scale transform which just scales the path, using a center point that takes the border widths into account?

> Optionally, you can provide a gradient-stop-like list of widths and colors, each associated with a path distance (0% indicating the start, and 100% indicating the end, or lengths can be used)

I don't think this will work very well if you apply it to boxes with different aspect ratios; the author would have a hard time matching gradient points with the box corners.

> It's very surprising for me that background is what fills between the shapes

I'm not sure it does? I think we can fill the space between the inner and outer shapes with border colors by default, with the usual diagonal corner joins.


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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 2 October 2024 15:51:35 UTC