Re: [csswg-drafts] [css-borders-4] corner-shape initial value ("round") is strange in some cases (e.g. bevel) (#11623)

The CSS Working Group just discussed `[css-borders-4] corner-shape initial value ("round") is strange in some cases (e.g. bevel)`, and agreed to the following:

* `RESOLVED: corners: <'corner-shape'> || <'border-radius'>`
* `RESOLVED: Add corners-* shorthands as longhands of corners, parallel to border-*-radius/corner-*-shape`
* `RESOLVED: Use 'corner' and 'corner-*' for all`

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> s/Topic: [css-selectors-4]/Subtopic: [css-selectors-4]/<br>
&lt;TabAtkins> noamr: this was originally aobut confusion with "round" being initial value for corner shapes<br>
&lt;TabAtkins> noamr: but we resolved on that. the resolution led us to have a shorthand that includes both border-radius and corner-shape<br>
&lt;TabAtkins> noamr: which is supposedly more coherent to read, becuase it doesn't default to round<br>
&lt;TabAtkins> noamr: you specify the corner shape, then the radiuses<br>
&lt;noamr> https://github.com/web-platform-tests/wpt/blob/9a533af8ca6f850effb6df5d6ce7bfaacecb971d/css/css-borders/corner-shape/corners-valid.html<br>
&lt;TabAtkins> noamr: i impld behind a flag in chrome<br>
&lt;TabAtkins> noamr: there were a couple things to reoslve on. do we like this?<br>
&lt;TabAtkins> noamr: and whether it should be 'corner' or 'corners'<br>
&lt;TabAtkins> noamr: so the syntax is, you always need a shape and one or two radiuses<br>
&lt;TabAtkins> noamr: you can have 1-4 repetitions, slash-separated<br>
&lt;TabAtkins> noamr: standard corner copying rule<br>
&lt;TabAtkins> normal means radius 0<br>
&lt;lea> q?<br>
&lt;lea> q+<br>
&lt;SebastianZ> +1 on the suggested syntax<br>
&lt;astearns> ack lea<br>
&lt;kbabbitt> q+<br>
&lt;TabAtkins> lea: why do we need a shorthand that sets everything? why is that desirable? why not us e the longhand in this case?<br>
&lt;SebastianZ> q+<br>
&lt;TabAtkins> lea: these can get confusing to read, like border-radius with all of its values. like border shorthands can't do different borders on each side<br>
&lt;TabAtkins> lea: you use longhands if you try to do everything<br>
&lt;TabAtkins> lea: shorthands that try to do everything get confusing, even people here probably make mistakes<br>
&lt;fantasai> border-radius: &lt;length-percentage [0,∞]>{1,4} [ / &lt;length-percentage [0,∞]>{1,4} ]?<br>
&lt;TabAtkins> TabAtkins: I'm not sure I udnerstand what's confusing here...<br>
&lt;astearns> https://github.com/web-platform-tests/wpt/blob/9a533af8ca6f850effb6df5d6ce7bfaacecb971d/css/css-borders/corner-shape/corners-valid.html<br>
&lt;TabAtkins> lea: like, line 15, do we want to encourage this?<br>
&lt;noamr> notch 10px / squircle 30% 10px / 1rem bevel / 2px round<br>
&lt;lea> notch 10px / squircle 30% 10px / 1rem bevel / 2px round", "10px notch / 30% 10px squircle / 1rem bevel / 2px round<br>
&lt;astearns> ack fantasai<br>
&lt;lea> corners: normal / superellipse(-0.5) 30% 10px / 10px 1rem notch", "normal / 30% 10px superellipse(-0.5) / 10px 1rem notch;<br>
&lt;TabAtkins> fantasai: i pasted the border-radius syntax into IRC. want to emphasize that this pattern is inconsistent with that one<br>
&lt;astearns> lea note that there are two string values from the lines you pasted<br>
&lt;TabAtkins> fantasai: border-radius takes the values for every corner in sequence, 1-4, then the slash doesn't separate the sides, but to seaprate x/y coords.<br>
&lt;lea> q+<br>
&lt;TabAtkins> fantasai: that allows you to specify one value and have it repeated up to 4 times, and can do it independently in x/y<br>
&lt;TabAtkins> fantasai: if we follow that pattern in the corners shorthand, the corner-shape values woudlnt' be split up by slashes<br>
&lt;SebastianZ> reverting my +1 :)<br>
&lt;TabAtkins> fantasai: slash only disambiguates x/y in border-radius<br>
&lt;TabAtkins> fantasai: most time, people just want to say the shape once and then give the border radiuses<br>
&lt;TabAtkins> fantasai: not repeat the corner just because radius is changing<br>
&lt;TabAtkins> fantasai: following the pattern of border-radius would make this easier<br>
&lt;fantasai> corners: &lt;'corner-shape'> || &lt;'border-radius'><br>
&lt;TabAtkins> fantasai: i think that would be pretty straightforward and reduce repetition<br>
&lt;TabAtkins> noamr: then you can't have different corner shapes<br>
&lt;TabAtkins> fantasai: you can, corner-shape takes four values<br>
&lt;astearns> q+<br>
&lt;TabAtkins> line 15 would be: notch squricle bevel round 10px 30% 10px 1rem 2px / 0 10px 0 0<br>
&lt;astearns> ack kbabbitt<br>
&lt;TabAtkins> line 15 would be: notch squricle bevel round 10px 30% 10px 1rem 2px / 10px 10px 1rem 2px<br>
&lt;TabAtkins> kbabbitt: I think it was mentioned that the shapes were a required part, our usual pattern is that values not specified are inferred as defautls<br>
&lt;TabAtkins> kbabbitt: i think if we take elika's suggestion that's the behavior that would fall out of it<br>
&lt;TabAtkins> noamr: that wouldn't fix the issue this was posted for, then<br>
&lt;TabAtkins> noamr: the issue is that people were confused "round" is the default<br>
&lt;florian> q?<br>
&lt;florian> q+<br>
&lt;TabAtkins> noamr: with a round default, people would still be confused<br>
&lt;TabAtkins> kbabbitt: so it's justa bout requiring explicitness to avoid confusion?<br>
&lt;TabAtkins> noamr: that, plus ergonomics for putting them together<br>
&lt;astearns> ack SebastianZ<br>
&lt;TabAtkins> SebastianZ: elika's syntax is what jskuhn suggested<br>
&lt;TabAtkins> SebastianZ: would we really want to just let the shape be defined there? or should we alway srequire radius as well<br>
&lt;TabAtkins> noamr: if radius goes to zero the shape doesn't do anything<br>
&lt;TabAtkins> fantasai: no, you can make them both optional, it's fine<br>
&lt;astearns> ack lea<br>
&lt;TabAtkins> fantasai: author can be doing more specific things later, just relying on the reset behavior. i do this with borders a lot. no reason not to make it optional<br>
&lt;TabAtkins> lea: yeah, fantasai's point about slashes working different is great. we shoudl be consistent<br>
&lt;SebastianZ> s/jskuhn/jsnkuhn/<br>
&lt;TabAtkins> lea: that said, i'm not sure expanded border-radius was godo i nthe first place<br>
&lt;TabAtkins> lea: if someone want to set all corners to same value, we should ahve a propery that does<br>
&lt;TabAtkins> TabAtkins: you can, `corners: 5px round`<br>
&lt;fantasai> TabAtkins: you can just say 'corners: round 10px'<br>
&lt;TabAtkins> lea: i'm not sure we *want* to allow the shorthand to set everything<br>
&lt;TabAtkins> lea: shorthands are about reduction of knowledge. a microsyntax makes things harder<br>
&lt;romain> +1<br>
&lt;TabAtkins> lea: experience shows authors don't use shorthands above a certain level of complexity<br>
&lt;SebastianZ> q+<br>
&lt;TabAtkins> lea: I find it's pretty low, too. authors don't even use background shorthand fully.<br>
&lt;astearns> q-<br>
&lt;TabAtkins> lea: if we want people to set top-left corner shape together with its size, we can have a property for that<br>
&lt;TabAtkins> lea: or block-start corners, etc<br>
&lt;TabAtkins> lea:  I dont' think we should stuff everything into a complex shorthand<br>
&lt;TabAtkins> q+<br>
&lt;astearns> ack florian<br>
&lt;TabAtkins> florian: I kinda agree people will mostly use shorthands for simple things<br>
&lt;TabAtkins> florian: but with border-radius you already have the options, following the pattern is fine<br>
&lt;TabAtkins> florian: you'll always have the longhands<br>
&lt;TabAtkins> florian: but we already have a few reasonable syntaxes, and it's consistent with border-radius<br>
&lt;TabAtkins> florian: not a fan of border-radius, but would like to keep it going.<br>
&lt;TabAtkins> florian: also, earlier you said people found it confusing the default is round, is that because they didn't realize that with 0 it's square anyway?<br>
&lt;TabAtkins> noamr: part was just trying to use corner-shape for a bevel, and saying "my corner is round just because I give it a radius"...<br>
&lt;TabAtkins> noamr: round being the default is more historical than intentional<br>
&lt;TabAtkins> noamr: it's also slightly more convenient feature-detection wise to set 'corners', can use border-radius by itself for a round version then 'corners' for a better one<br>
&lt;fantasai> TabAtkins: I don't think we need to justify having a shorthand<br>
&lt;TabAtkins> SebastianZ: their argument was, when you don't apply  border-radius, the shape is square<br>
&lt;TabAtkins> SebastianZ: so an initial "round" value was confusing<br>
&lt;astearns> ack fantasai<br>
&lt;TabAtkins> fantasai: I don't think... there are cases in shorthands where we default to something other than initial value, but only with very good reason, because other values are implying a different value<br>
&lt;TabAtkins> fantasai: not the case here, if you have radiuses, round is the right thing to default to<br>
&lt;TabAtkins> fantasai: because if border-radius creates rounded, but 'corners' defaults to bevel, that's confusing<br>
&lt;TabAtkins> fantasai: the previous shorthand syntax proposal required you to repeat your corner shape on each corner, if you want different radiuses<br>
&lt;TabAtkins> fantasai: but if we switch to the one that matches border-radisu, you don't have to do that<br>
&lt;TabAtkins> fantasai: that's why we designed border-radius the way we did<br>
&lt;astearns> ack SebastianZ<br>
&lt;TabAtkins> SebastianZ: Lea already brought up a good point. I think in addition to corners, we should have shorthand for the different corners. we have that for corner-shape and border-radius<br>
&lt;TabAtkins> fantasai: agree<br>
&lt;TabAtkins> noamr: just another 16 properties (corner + sides * logical)<br>
&lt;TabAtkins> florian: do we care about the memory cost of all these shorthands?<br>
&lt;TabAtkins> emilio: long hands matter, shorthands not as much<br>
&lt;astearns> ack TabAtkins<br>
&lt;fantasai> TabAtkins: I agree that complicated shorthand sare bad, but this is not a complicated shorthand itself,<br>
&lt;fantasai> TabAtkins: It just invokes existing shorthands by combining them with ||<br>
&lt;fantasai> TabAtkins: This is the simplest thing we can do<br>
&lt;lea> q+<br>
&lt;fantasai> TabAtkins: Just because  longhands are complicated ...<br>
&lt;fantasai> TabAtkins: Having more limited shorthand is not good<br>
&lt;astearns> ack lea<br>
&lt;fantasai> TabAtkins: We only skip the ability to represent values in a shorthand if it's really untenable<br>
&lt;SebastianZ> q+ on naming the shorthand(s)<br>
&lt;TabAtkins> lea: it's not a design goal to expose the complexity of all long hands. borders all allow setting individual values per corner<br>
&lt;TabAtkins> lea: but we don't allow setting everything in the shorthand<br>
&lt;fantasai> TabAtkins: Agree, but syntax for 'border' shorthand intentionally doesn't put all 4 things together<br>
&lt;fantasai> lea: What we're doing here is very similar<br>
&lt;fantasai> lea: If we design 'border' today, we would enable setting all the values<br>
&lt;astearns> ack fantasai<br>
&lt;lea> s/lea: If we design 'border' today, we would enable setting all the values/lea: it's as if we were designing `border` today and trying to make it set separate color, width, style values for each side/<br>
&lt;TabAtkins> fantasai: I agree with Tab<br>
&lt;TabAtkins> fantasai: if we dont' have a compelling reason to disable the ability to represent all the longhands, we try to make it possible<br>
&lt;TabAtkins> fantasai: and this is a case where if you want to do the simple things, it is very simple. it's *possible* to do the complex things.<br>
&lt;kbabbitt> +1<br>
&lt;TabAtkins> fantasai: it's fine if 90% of the time you just use the simple version, that's what shorthands are for<br>
&lt;TabAtkins> fantasai: doens't mean we should blocka  syntax that allows all the values<br>
&lt;fantasai> PROPOSED: corners: &lt;'corner-shape'> || &lt;'border-radius'><br>
&lt;TabAtkins> astearns: can we resolve to use the new proposed syntax?<br>
&lt;TabAtkins> astearns: any more discussion about the syntax? if we have the shorthand at all, sounds like this should be the syntax.<br>
&lt;florian> +1<br>
&lt;TabAtkins> astearns: objections?<br>
&lt;fantasai> RESOLVED: corners: &lt;'corner-shape'> || &lt;'border-radius'><br>
&lt;fantasai> PROPOSED: Add corners-* shorthands as longhands of corners<br>
&lt;TabAtkins> astearns: now, should we add shorthands for all the corner variations, to match border-radius<br>
&lt;kbabbitt> q+<br>
&lt;astearns> ack kbabbitt<br>
&lt;TabAtkins> kbabbitt: not an objection, just clarifying request<br>
&lt;TabAtkins> kbabbitt: sounds like a tuple for each corner<br>
&lt;fantasai> RESOLVED: Add corners-* shorthands as longhands of corners, parallel to border-*-radius/corner-*-shape<br>
&lt;astearns> ack SebastianZ<br>
&lt;Zakim> SebastianZ, you wanted to comment on naming the shorthand(s)<br>
&lt;lea> q+<br>
&lt;TabAtkins> SebastianZ: I had a pragmatic reason for renaming to 'corner' rather rthan 'corners'<br>
&lt;TabAtkins> SebastianZ: tool completion is usually alphabetic<br>
&lt;astearns> we’re modeling after border-radius, not border-radii…<br>
&lt;TabAtkins> SebastianZ: i think shorthands will be used more than longhands, but 'corners' sorts after 'corner-'<br>
&lt;astearns> ack lea<br>
&lt;TabAtkins> lea: we don't usually design around tooling, tooling can change more easily than css<br>
&lt;TabAtkins> lea: that said, the one reason I can think of for naming it corner is it follows the prefixing practice<br>
&lt;noamr> q+<br>
&lt;TabAtkins> lea: but also, seeing "corner: ..." in a stylesheet looks a little werid<br>
&lt;TabAtkins> lea: there's some precedent, "columns" vs "column-width"<br>
&lt;astearns> ack noamr<br>
&lt;florian> q+<br>
&lt;TabAtkins> noamr: why I suggested corners before is, unlike border/background, you don't have a concept of "a" corner. You dont' say "what corner does it have", you say "what corners does it have". unlike "what border does it have"<br>
&lt;TabAtkins> noamr: so it just works better in English I think<br>
&lt;astearns> ack florian<br>
&lt;TabAtkins> florian: for short shorthand, 'corners' is okay either way. for the mid shorthands, the resolution says 'corners-top-left', sounds bad. want to go singular for that<br>
&lt;fantasai> PROPOSED: s/corners-*/corner-*/ on the shorthand<br>
&lt;fantasai> PROPOSED: s/corners-*/corner-*/ on the long shorthands<br>
&lt;astearns> ack fantasai<br>
&lt;Zakim> fantasai, you wanted to ask wrt the shorthands<br>
&lt;TabAtkins> florian: in some cases singular is obvious, in some it's arguable, but it's definitely not correct to be plural everywhere<br>
&lt;fantasai> astearns: border-radius, not border-radii<br>
&lt;fantasai> TabAtkins: People don't talk about border-radii of the box<br>
&lt;TabAtkins> s/border-radii/border-radiuses/<br>
&lt;fantasai> fantasai: Should we resolve on the long shorthand?<br>
&lt;fantasai> fantasai: since they're singular<br>
&lt;fantasai> florian: We well have the mid shorthands, for two corners each<br>
&lt;TabAtkins> SebastianZ: we should be consistent across the shorthands<br>
&lt;fantasai> SebastianZ: We should be consistent across the shorthands, regarding the naming<br>
&lt;fantasai> TabAtkins: do you mean all of them, or all of the mid shorthands<br>
&lt;TabAtkins> astearns: all of them<br>
&lt;kbabbitt> +1 to singular in all the shorthands<br>
&lt;TabAtkins> noamr: i'm convinced consistency is more important than English practice here<br>
&lt;TabAtkins> astearns: sound slike consensus for 'corner' in all cases<br>
&lt;TabAtkins> astearns: objections?<br>
&lt;TabAtkins> RESOLVED: Use 'corner' and 'corner-*' for all<br>
&lt;fantasai> I was ambivalent, but I'm convinced by the "one vs two vs four" of shorthand<br>
&lt;TabAtkins> lea: the tag principle does stress consistency, but says other things can take precedence<br>
&lt;TabAtkins> fantasai: I was ambivalent until we started talking about the longer shorthands<br>
&lt;TabAtkins> fantasai: corners-top-left only sets one corner, but corners-top is setting two<br>
&lt;TabAtkins> fantasai: corner-top-left and corners-top is confusing<br>
&lt;lea> q+<br>
&lt;astearns> ack fantasai<br>
&lt;Zakim> fantasai, you wanted to respond to lea<br>
&lt;TabAtkins> fantasai: both singular or both plural is fine. but corner-top-left is just kinda weird anyway<br>
&lt;ydaniv> q+<br>
&lt;TabAtkins> lea: have we considered having a singular when setting one corner and a plural when setting multiple?<br>
&lt;TabAtkins> astearns: yes, we just discussed that. I agree it's too confusing<br>
&lt;astearns> ack ydaniv<br>
&lt;TabAtkins> TabAtkins: agreed<br>
&lt;TabAtkins> ydaniv: some people look at it like 'corners' is a namespace<br>
&lt;TabAtkins> ydaniv: corners-top-left is like corners.topLeft<br>
&lt;fantasai> s/corner-to-left is just kinda weird anyway/but corner-top-left and corners-top, where one is plural and the other not, is going to be confusing for authors/<br>
&lt;TabAtkins> ydaniv: so it's not that weird to some people<br>
&lt;florian> q?<br>
&lt;TabAtkins> florian: also note that a large fraction of the population doens't have native plurals<br>
&lt;TabAtkins> florian: if you have to already intuit English grammar when programming, not impossible, but one more thing to remember<br>
&lt;fantasai> s/confusing for authors/confusing for authors, and corners-top-left where we're pluralizing a singular is also weird/<br>
&lt;fantasai> +1 wrt i18n<br>
&lt;TabAtkins> astearns: cutting bikeshedding short. if someone thinks having two words for the shorthands is something to do, we can discuss it later<br>
&lt;TabAtkins> astearns: break time<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11623#issuecomment-3209549632 using your GitHub account


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

Received on Thursday, 21 August 2025 08:32:47 UTC