Re: [csswg-drafts] [css-backgrounds-4] corner-shape naming (#6521)

> Random thoughts mostly on naming:
> 
> * Reusing `border-radius` forces a round corner fallback and honestly I don't know if i'd ever really want that. the default rectangle corner shape seems like a better fallback for `angle` and `notch` to me. Maybe it's useful for `scoop`?

Agreed.

> * for what it's worth I've personally settled on `--corner-shape` and `--corner-size` as property names in the PaintAPI polyfill I've been working on.

That would be nice indeed, though then we'd need to define how `border-radius` and `corner-radius` interact when both are set.

> * `corners` should probably be `corner` because CSS properties are singular.

There is precedent of this pattern (singular longhands, plural shorthand) with multicol: `column-count` and `columns`

> * more and more been wondering if `corner-shape` should just be part of CSS-Shapes as a corner() function. Note that inset() already has an optional param for rounding ( `clip-path: inset(10px round 8px);`) that probably would need to be built on with the other corner-shape options. Feels at the moment that the rounding is hiding inside `inset()` and should just be broken out as its own thing.
> 
> This way `corner()` could be reused as part of something like `element-shape`, `clip-path`, `shape-inside/outside`, and to make a background/mask/border-image etc.?

I think that actually makes sense. Right now, many use cases for corner shape are essentially hacks that are trying to use it to set element shape. We do have #6997 for `element-shape` though do note this is significantly more complex and thus could take a long time to happen (if it ever does). In general a lot of the complexity with these things has to do with borders, especially when they are all different (different widths, styles, colors).

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


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

Received on Wednesday, 13 July 2022 12:06:48 UTC