Skip to content

[css-backgrounds-4] Order of keywords in border-*-radius shorthands #8469

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
SebastianZ opened this issue Feb 18, 2023 · 7 comments
Closed
Labels
Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-backgrounds-4

Comments

@SebastianZ
Copy link
Contributor

Currently, the order of the border-*-radius shorthand values is defined as top to bottom and left to right for the physical properties and start to end for the logical properties.

Though @Loirooriol questioned this and proposed to rather follow the clockwise order used for the border-radius shorthand.

So border-radius: 1px 2px 3px 4px would be equivalent to

border-top-radius: 1px 2px;
border-bottom-radius: 3px 4px;

instead of

border-top-radius: 1px 2px;
border-bottom-radius: 4px 3px;

The question is, do authors rather expect opposite sides to always follow one direction or have a clockwise order?

This question similarily applies to the logical shorthands. Should they always be start to end or should they map differently?

I tend to say one direction, though it also goes against border-radius.

Sebastian

@tabatkins
Copy link
Member

I really don't think they should follow the clockwise ordering. The clockwise ordering makes sense in the context of four values; if you're only specifying two values it's nonsense, because it gives opposite orders for opposite sides. top and bottom should definitely set the values left->right (or start->end), etc.

@Loirooriol
Copy link
Contributor

start->end totally makes sense for logical shorthands. But do we have a precedent for assuming that physical left->right and top->bottom is the natural progression?

@tabatkins
Copy link
Member

Yes, any property with single-axis values uses that progression unless there's a good reason not to. See 'background-position', for instance - each axis's length is measured from the top/left, with larger values proceeding downward/rightward.

(Note that some seeming exceptions, like the 'right' property, are not based on an axis, but rather on a side, and thus are measuring along an outside <-> inside dimension.)

@Loirooriol
Copy link
Contributor

Mm, OK, in background-position it's not for the purpose of shorthand expansion, but I guess it's close enough.

@SebastianZ SebastianZ added the Async Resolution: Proposed Candidate for auto-resolve with stated time limit label Mar 20, 2023
@SebastianZ
Copy link
Contributor Author

As it seems we agree on this now, let's make this official.

Proposed resolution: Close this issue without changing the spec. I.e. the order for the border-*-radius shorthands is always left to right and top to bottom for physical values and start to end for logical values.

Sebastian

@astearns
Copy link
Member

If there is no spec change, then we do not need a resolution. Particularly since you opened the issue @SebastianZ feel free to close no change and add a 'commenter satisfied' label.

@astearns astearns removed the Async Resolution: Proposed Candidate for auto-resolve with stated time limit label Mar 29, 2023
@SebastianZ
Copy link
Contributor Author

Thanks for the hint, @astearns!

@SebastianZ SebastianZ closed this as not planned Won't fix, can't repro, duplicate, stale Mar 31, 2023
@SebastianZ SebastianZ added the Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. label Mar 31, 2023
SebastianZ added a commit to SebastianZ/csswg-drafts that referenced this issue Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-backgrounds-4
Projects
None yet
Development

No branches or pull requests

5 participants
@tabatkins @SebastianZ @astearns @Loirooriol and others