-
Notifications
You must be signed in to change notification settings - Fork 689
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
[css-logical-props] border‐radius
#491
Comments
I would also suggest adding the following shorthands, if you want to put a border-radius on only one side of a box. Each shorthand syntax would be:
Similar to the
examples: .a {
border-block-start-radius: 11px;
/* equivalent to: */
border-start-start-radius: 11px;
border-start-end-radius: 11px;
}
.b {
border-block-start-radius: 11px 22px;
/* equivalent to: */
border-start-start-radius: 11px;
border-start-end-radius: 22px;
}
.c {
border-block-start-radius: 11px / 22px;
/* equivalent to: */
border-start-start-radius: 11px 22px;
border-start-end-radius: 11px 22px;
}
.d {
border-block-start-radius: 11px 22px / 33px 44px;
/* equivalent to: */
border-start-start-radius: 11px 33px;
border-start-end-radius: 22px 44px;
}
.e {
border-block-start-radius: 11px 22px / 33px;
/* equivalent to: */
border-start-start-radius: 11px 33px;
border-start-end-radius: 22px 33px;
}
.f {
border-block-start-radius: 11px / 22px 33px;
/* equivalent to: */
border-start-start-radius: 11px 22px;
border-start-end-radius: 11px 33px;
} |
It was left out because css-logical is mainly about the CSS2-level properties: newer modules are expected to define their logical features themselves, and for css-backgrounds that will be in Level 4. |
CSSWG resolution on this topic: https://lists.w3.org/Archives/Public/www-style/2015Feb/0504.html |
Another thing to consider is the order of the two-value syntax for ellipse radii. In the current spec, Here's an example of why we would want it to change based on writing mode. Let’s say that no matter what the writing mode, we want the block-direction to be 25 and inline-direction to be 55. .alert {
background: pink;
border: 1px solid red;
border-top-left-radius: 55px 25px; /* horizontal/inline-direction = 55, vertical/block-direction = 25 */
}
/* must switch for Han-based writing modes */
.japanese .alert {
border-top-left-radius: 25px 55px; /* horizontal/block-direction = 25, vertical/inline-direction = 55 */
} Also it would be much more consistent to have Y before X for everything, so authors don't have to remember which properties are “X before Y” (like background-size) and which are “Y before X” (like margin). But I think that's more of a theoretical advantage than a practical one. |
@zamfofex The properties suggested by you already made it into the spec. in the meantime.
Those were added to CSS Borders 4.
Browsers shipped the properties with the horizontal-first syntax a long time ago. So changing the order now would be web-incompatible. I think it's safe to close this issue now. If I am missing something, please feel free to reopen it or file new issues. Sebastian |
border‐radius
was left out of css-logical-props for no aparent particularly good reason.I think the following properties should be present in the spec:
The first part would be related to the block axis and the second part to the inline axis.
And alternative would be
border-block-start-inline-start-radius
, but that feels unnecessarily verbose.The text was updated successfully, but these errors were encountered: