Skip to content

[css-borders-4] Define the 'corners' shorthand #12359

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
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions css-borders-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,31 @@ The 'corner-*-shape' Shorthands And Longhands</h4>
That is, ''corner-block-start-shape: round square''
sets ''corner-start-start-shape: round; corner-start-end-shape: square;''.

<h4 id=corners-shorthand>
The 'corners' Shorthands</h4>

<pre class=propdef>
Name: corners
Value: <<corner-value>> [ / <<corner-value>> ]{0,3}
Initial: round
Applies to: all elements where 'border-radius' can apply
Inherited: no
Logical property group: corner-shape
Computed value: the corresponding ''superellipse()'' value
Animation Type: see [=superellipse interpolation=]
</pre>

<pre class=prod>
'corners' = <<corner-value>> [ / <<corner-value>> ]{0,3}
<<corner-value>> = [ <<length-percentage [0,&infin;]>> && <<corner-shape-value>> ] | normal
</pre>

The 'corners' shorthand corresponds to all the four 'corner-*-*-shape' and 'border-*-*-radius',
in the order top-left, top-right, bottom-right, bottom-left. If bottom-left is omitted it is the same as top-right. If bottom-right is omitted it is the same as top-left. If top-right is omitted it is the same as top-left.

Each <dfn><<corner-value>></dfn> includes both a 'border-*-*-radius' and a 'corner-*-*-shape' value,
or a <dfn dfn-type=value dfn-for=corners>normal</dfn> keyword that resolves to a <code>0px</code> ''border-radius'' with a ''corner-shape/round'' corner.

<h4 id=corner-shape-rendering>
Rendering 'corner-shape'</h4>

Expand Down