Skip to content

[css-borders-4] Rename border-clip-<side> to border-<side>-clip? #9252

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

Open
cdoublev opened this issue Aug 28, 2023 · 6 comments
Open

[css-borders-4] Rename border-clip-<side> to border-<side>-clip? #9252

cdoublev opened this issue Aug 28, 2023 · 6 comments

Comments

@cdoublev
Copy link
Collaborator

I am not sure there is a pressing need to stabilize and implement border-clip but the naming of its longhands seems inconsistent with other border properties:

  • border-top-color
  • border-top-radius
  • border-top-style
  • border-top-width
  • ...
  • border-clip-top
@SebastianZ
Copy link
Contributor

Renaming them makes sense to me. As that's probably a quick decision, let's add this to the agenda.

Sebastian

@Loirooriol
Copy link
Contributor

border-top-clip seems to imply that it's a longhand of border-top. Is that the case?

@SebastianZ
Copy link
Contributor

So far it isn't and so isn't border-top-radius. Same with border-radius and border.

Discussing whether the new properties should be affected or even be part of the related shorthands, is a whole different discussion. @Loirooriol Can you please open a seperate issue for that?

Sebastian

@fantasai
Copy link
Collaborator

I'm just going to mark this as accepted Editor Discretion. This feature was only partially drafted in the first place, and this is an obvious fix to that editor's draft. The whole feature needs CSSWG review once it's properly drafted anyway.

@Loirooriol
Copy link
Contributor

I don't think the relationship with the shorthand is an unrelated discussion. I prefer border-clip-<side> if border-<side> is not going to be a shorthand. So at this point I disagree with the change being an obvious fix.

@cdoublev
Copy link
Collaborator Author

I am not aware of the discussions that have taken place about border-<side>-radius rather than border-radius-<side>, whereas there is no relationship with border-<side>.

Assuming this syntax would be valid in the future...:

.box {
  border: {
    color: green;
    clip: 10px 1fr;
    top: {
      clip: normal;
      color: red;
    }
  }
}

... I do not have a clear idea on how shorthand expansion would work, but the order of the components in border-<side>-<feature> would not matter. border-top-clip may be handled as an alias of border-clip-top (which may also apply today), but considering <feature> as a property of border-<side> seems more natural to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants