CSS border-end-end-radius Property
The border-end-end-radius property rounds the corner where an element's block-end and inline-end edges meet.
Unlike physical corner properties such as border-bottom-right-radius, this logical property follows the element's writing-mode and direction. It accepts one or two radius values, allowing circular or elliptical corners that adapt to different writing systems.
border-end-end-radius Syntax
selector {
border-end-end-radius: 20px;
}
The property accepts one or two nonnegative length or percentage values.
.circular {
border-end-end-radius: 20px;
}
.elliptical {
border-end-end-radius: 40px 15px;
}
.percentage {
border-end-end-radius: 25%;
}
.mixed {
border-end-end-radius: 30% 20px;
}
With one value, both radii are equal. With two values, the first specifies the horizontal radius and the second specifies the vertical radius.
CSS-Wide Keywords
.inherited {
border-end-end-radius: inherit;
}
.reset {
border-end-end-radius: initial;
}
.unset {
border-end-end-radius: unset;
}
.reverted {
border-end-end-radius: revert;
}
.layer-reverted {
border-end-end-radius: revert-layer;
}
CSS-wide keywords must be used alone. They cannot be combined with radius values in the same declaration.
Property Values
| Value | Description |
|---|---|
<length> |
Sets a radius using a nonnegative CSS length, such as px, rem, or em. |
<percentage> |
Sets a radius relative to the dimensions of the element's border box. |
| One value | Uses the same value for the horizontal and vertical radii. |
| Two values | Sets the horizontal radius first and the vertical radius second. |
0 |
Removes the rounding from the logical end-end corner. This is the initial value. |
CSS-Wide Keywords
| Keyword | Behavior |
|---|---|
inherit |
Inherits the parent's computed radius value. |
initial |
Resets the radius to 0. |
unset |
Resets the radius to 0 because the property is not inherited. |
revert |
Reverts the value according to cascade origin rules. |
revert-layer |
Reverts the value according to cascade layer rules. |
The initial value is 0. The property is not inherited, and its radius values can be animated.
How It Works
The border-end-end-radius property identifies a corner using two logical directions rather than a fixed physical position.
- Block-end: The edge where the block flow ends.
- Inline-end: The edge where the inline text flow ends.
The corner where these edges meet receives the specified radius.
Basic Logical Corner
.panel {
width: 240px;
padding: 20px;
border: 3px solid #1769aa;
border-end-end-radius: 30px;
}
In a left-to-right horizontal writing mode, the bottom-right corner is rounded.
Changing Text Direction
.panel {
direction: rtl;
border: 3px solid #1769aa;
border-end-end-radius: 30px;
}
In a right-to-left horizontal writing mode, the logical end-end corner maps to the bottom-left corner.
Changing Writing Mode
.panel {
writing-mode: vertical-rl;
direction: ltr;
border: 3px solid #1769aa;
border-end-end-radius: 30px;
}
In this vertical writing mode, block-end is the left edge and inline-end is the bottom edge. The bottom-left corner is rounded.
No Layout Change
Rounding a corner changes its painted shape but does not change the element's rectangular layout dimensions. The element continues to occupy the same space.
The property can affect the border and background shape even when no visible border is specified.
Logical Corner Mapping
The physical corner affected by border-end-end-radius depends on the element's writing mode and direction.
| Writing Mode | Direction | Physical Corner |
|---|---|---|
horizontal-tb |
ltr |
Bottom-right |
horizontal-tb |
rtl |
Bottom-left |
vertical-rl |
ltr |
Bottom-left |
vertical-rl |
rtl |
Top-left |
vertical-lr |
ltr |
Bottom-right |
vertical-lr |
rtl |
Top-right |
Horizontal Left-to-Right
.panel {
writing-mode: horizontal-tb;
direction: ltr;
border-end-end-radius: 30px;
}
The bottom-right corner is rounded.
Horizontal Right-to-Left
.panel {
writing-mode: horizontal-tb;
direction: rtl;
border-end-end-radius: 30px;
}
The bottom-left corner is rounded.
Vertical Right-to-Left Block Flow
.panel {
writing-mode: vertical-rl;
direction: ltr;
border-end-end-radius: 30px;
}
The bottom-left corner is rounded.
Vertical Left-to-Right Block Flow
.panel {
writing-mode: vertical-lr;
direction: ltr;
border-end-end-radius: 30px;
}
The bottom-right corner is rounded.
Logical corner properties are particularly useful for interfaces that support multiple languages or writing modes.
Circular and Elliptical Corners
The property supports circular and elliptical corner shapes.
Circular Corner
.panel {
border-end-end-radius: 30px;
}
A single value sets equal horizontal and vertical radii, producing a circular quarter-curve when space permits.
Elliptical Corner
.panel {
border-end-end-radius: 60px 20px;
}
The horizontal radius is 60 pixels, and the vertical radius is 20 pixels. This produces a wider, shallower curve.
Tall Elliptical Corner
.panel {
border-end-end-radius: 20px 60px;
}
The horizontal radius is 20 pixels, and the vertical radius is 60 pixels. This creates a taller curve.
One Radius Set to Zero
.panel {
border-end-end-radius: 40px 0;
}
When either radius is zero, the corner is not rounded.
No Slash Separator
Unlike the border-radius shorthand, this individual corner property uses a space between its two radius values.
.valid {
border-end-end-radius: 40px 20px;
}
.invalid {
border-end-end-radius: 40px / 20px;
}
The second declaration is invalid because a slash is not permitted in this longhand property.
Lengths and Percentages
The border-end-end-radius property accepts nonnegative lengths and percentages.
Pixel Values
.panel {
border-end-end-radius: 24px;
}
Pixel values provide a consistent radius independent of the element's dimensions, unless the browser must reduce overlapping corner radii.
Relative Lengths
.panel {
border-end-end-radius: 1.5rem;
}
The rem unit is based on the root element's font size.
Percentage Values
.panel {
border-end-end-radius: 25%;
}
For percentage radii, the horizontal radius is calculated relative to the border box width and the vertical radius relative to the border box height.
Mixed Units
.panel {
border-end-end-radius: 30% 20px;
}
The horizontal radius uses 30% of the border box width. The vertical radius is 20 pixels.
Using calc()
.panel {
border-end-end-radius: calc(10px + 2vw);
}
The calc() function combines length values into a calculated radius.
Using clamp()
.panel {
border-end-end-radius: clamp(12px, 4vw, 48px);
}
The radius adjusts with the viewport width while remaining within the specified minimum and maximum.
Using Custom Properties
:root {
--corner-radius: 24px;
}
.panel {
border-end-end-radius: var(--corner-radius);
}
Custom properties make it easier to reuse and update radius values across multiple elements.
Invalid Negative Values
.invalid {
border-end-end-radius: -10px;
}
Negative radius values are invalid and cause the declaration to be ignored.
Writing Mode and Direction
Logical corner properties adapt to the element's writing mode and text direction without requiring separate physical corner declarations.
Left-to-Right Content
.message {
direction: ltr;
writing-mode: horizontal-tb;
border-end-end-radius: 24px;
}
The bottom-right corner is rounded.
Right-to-Left Content
.message {
direction: rtl;
writing-mode: horizontal-tb;
border-end-end-radius: 24px;
}
The bottom-left corner is rounded automatically.
Vertical Text
.vertical-panel {
writing-mode: vertical-rl;
direction: ltr;
border-end-end-radius: 24px;
}
The property rounds the bottom-left corner because that is where block-end and inline-end meet in this writing mode.
Language-Aware Components
.message-card {
border: 2px solid #1769aa;
border-end-end-radius: 24px;
}
The same CSS can be used for left-to-right and right-to-left interfaces. The rounded corner changes position according to the element's computed writing direction.
This reduces the need for direction-specific stylesheets and physical corner overrides.
Border-Radius Shorthand
The border-radius shorthand controls all four corners using physical corner positions. The border-end-end-radius property controls one logical corner.
Starting With All Corners
.panel {
border-radius: 16px;
border-end-end-radius: 40px;
}
All corners begin with a 16-pixel radius. The logical end-end corner receives a 40-pixel radius.
Resetting the Logical Corner
.panel {
border-radius: 20px;
border-end-end-radius: 0;
}
The logical end-end corner becomes square while the other three corners remain rounded.
Shorthand After Logical Longhand
.panel {
border-end-end-radius: 40px;
border-radius: 12px;
}
The later border-radius declaration sets all four physical corner radii to 12 pixels, including the corner previously targeted by the logical property.
Elliptical Shorthand
.panel {
border-radius: 20px / 10px;
border-end-end-radius: 50px 20px;
}
The shorthand assigns horizontal and vertical radii to all corners. The logical longhand then overrides the end-end corner with its own two values.
Physical Corner Equivalent
.physical {
border-bottom-right-radius: 30px;
}
.logical {
writing-mode: horizontal-tb;
direction: ltr;
border-end-end-radius: 30px;
}
Both declarations affect the bottom-right corner in a left-to-right horizontal writing mode. The logical version adapts when the writing mode or direction changes.
When logical and physical properties target the same corner, the CSS cascade determines which declaration wins. Use a consistent approach to avoid unintended overrides.
Borders and Backgrounds
The property affects the shape of an element's border and the rounded edges used when painting its background.
Visible Border
.panel {
border: 4px solid #1769aa;
border-end-end-radius: 36px;
}
The border follows the rounded logical corner.
Background Without a Border
.panel {
background-color: #e8f2fb;
border-end-end-radius: 36px;
}
The background follows the rounded corner even though no visible border is specified.
Border and Background Together
.panel {
border: 3px solid #1769aa;
background-color: #e8f2fb;
border-end-end-radius: 36px;
}
The border and background share the same rounded corner geometry.
Background Clipping
.panel {
border: 8px solid rgb(23 105 170 / 50%);
background-color: #e8f2fb;
background-clip: padding-box;
border-end-end-radius: 36px;
}
The background is clipped to the padding box rather than extending underneath the border.
Clipping Descendant Content
.panel {
border-end-end-radius: 36px;
overflow: hidden;
}
Rounded corners do not automatically guarantee that overflowing descendant content will be clipped to the curved edge. The overflow property can be used when clipping is required.
Use overflow clipping carefully when the element contains dropdowns, focus indicators, or other content that may need to extend beyond its boundaries.
Responsive Radius Values
Responsive radius values allow the corner shape to adjust to different element sizes and viewport widths.
Percentage-Based Radius
.responsive-panel {
border-end-end-radius: 20%;
}
The radius changes as the border box dimensions change.
Viewport-Based Radius
.responsive-panel {
border-end-end-radius: 4vw;
}
The radius responds to the viewport width.
Clamped Radius
.responsive-panel {
border-end-end-radius: clamp(16px, 5vw, 60px);
}
The radius grows with the viewport but remains between 16 and 60 pixels.
Media Query Adjustment
.responsive-panel {
border-end-end-radius: 48px;
}
@media (max-width: 600px) {
.responsive-panel {
border-end-end-radius: 20px;
}
}
The radius becomes smaller on narrower screens.
Container Query Adjustment
.panel-container {
container-type: inline-size;
}
.responsive-panel {
border-end-end-radius: 20px;
}
@container (min-width: 500px) {
.responsive-panel {
border-end-end-radius: 48px;
}
}
The radius changes according to the width of the containing query container rather than the viewport.
Responsive radius values are useful when a component needs to maintain a consistent visual style across different layouts.
Transitions and Animation
The border-end-end-radius property supports transitions and animations between compatible radius values.
Hover Transition
.animated-panel {
border: 3px solid #1769aa;
border-end-end-radius: 12px;
transition: border-end-end-radius 300ms ease;
}
.animated-panel:hover {
border-end-end-radius: 48px;
}
@media (prefers-reduced-motion: reduce) {
.animated-panel {
transition: none;
}
}
The logical corner gradually becomes more rounded when the pointer moves over the element.
Elliptical Transition
.animated-panel {
border-end-end-radius: 20px 20px;
transition: border-end-end-radius 300ms ease;
}
.animated-panel:hover {
border-end-end-radius: 60px 15px;
}
@media (prefers-reduced-motion: reduce) {
.animated-panel {
transition: none;
}
}
Both radii transition, changing the corner from a circular curve to an elliptical curve.
Keyframe Animation
.animated-panel {
border-end-end-radius: 12px;
animation: logical-corner-change 2s ease-in-out infinite alternate;
}
@keyframes logical-corner-change {
from {
border-end-end-radius: 12px;
}
to {
border-end-end-radius: 60px;
}
}
@media (prefers-reduced-motion: reduce) {
.animated-panel {
animation: none;
}
}
The corner repeatedly changes between smaller and larger radii.
Animating the radius changes the painted shape without changing the element's rectangular layout dimensions.
Practical Uses
The border-end-end-radius property is useful for components that need asymmetric rounded corners while supporting multiple writing directions.
Message Card
.message-card {
padding: 20px;
border: 2px solid #1769aa;
border-radius: 16px;
border-end-end-radius: 40px;
background-color: #e8f2fb;
}
The logical end-end corner receives a larger radius than the other corners.
Directional Callout
.callout {
padding: 16px;
border: 2px solid #1769aa;
border-end-end-radius: 36px;
background-color: #f3f8fc;
}
The rounded corner follows the element's logical flow direction.
Asymmetric Button
.action-button {
padding: 12px 20px;
border: 2px solid #1769aa;
border-radius: 8px;
border-end-end-radius: 28px;
background-color: #1769aa;
color: white;
}
The button has one more strongly rounded logical corner.
RTL-Compatible Panel
.localized-panel {
padding: 20px;
border: 3px solid #1769aa;
border-end-end-radius: 40px;
}
.localized-panel[dir="rtl"] {
direction: rtl;
}
The same radius declaration rounds the bottom-right corner in LTR and the bottom-left corner in RTL when using horizontal writing mode.
Square One Logical Corner
.feature-card {
border-radius: 20px;
border-end-end-radius: 0;
}
Three corners remain rounded while the logical end-end corner is square.
border-end-end-radius Example
The following example demonstrates how the same logical radius affects different physical corners in left-to-right, right-to-left, and vertical writing modes.
<div class="logical-radius-demo">
<div class="demo-item">
<h3>Horizontal LTR</h3>
<div class="demo-box horizontal-ltr">End-End</div>
</div>
<div class="demo-item">
<h3>Horizontal RTL</h3>
<div class="demo-box horizontal-rtl">End-End</div>
</div>
<div class="demo-item">
<h3>Vertical RL</h3>
<div class="demo-box vertical-rl">End-End</div>
</div>
<div class="demo-item">
<h3>Vertical LR</h3>
<div class="demo-box vertical-lr">End-End</div>
</div>
</div>
.logical-radius-demo {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 20px;
}
.logical-radius-demo .demo-item {
min-width: 0;
}
.logical-radius-demo h3 {
margin-bottom: 12px;
font-size: 1rem;
}
.logical-radius-demo .demo-box {
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
min-height: 140px;
padding: 16px;
border: 4px solid #1769aa;
background-color: #e8f2fb;
color: #173b5e;
font-weight: bold;
text-align: center;
border-end-end-radius: 50px;
}
.logical-radius-demo .horizontal-ltr {
writing-mode: horizontal-tb;
direction: ltr;
}
.logical-radius-demo .horizontal-rtl {
writing-mode: horizontal-tb;
direction: rtl;
}
.logical-radius-demo .vertical-rl {
writing-mode: vertical-rl;
direction: ltr;
}
.logical-radius-demo .vertical-lr {
writing-mode: vertical-lr;
direction: ltr;
}
Horizontal LTR
Horizontal RTL
Vertical RL
Vertical LR
The horizontal LTR example rounds the bottom-right corner.
The horizontal RTL example rounds the bottom-left corner.
The vertical-rl example rounds the bottom-left corner, while the vertical-lr example rounds the bottom-right corner.
All four examples use the same border-end-end-radius: 50px declaration. Only the writing mode and direction change.
Important Considerations
Keep the following points in mind when using border-end-end-radius:
- Logical corner: Rounds the corner where block-end and inline-end meet.
- Initial value: The initial radius is
0. - Inheritance: The property is not inherited.
- Writing mode: The affected physical corner changes with
writing-mode. - Text direction: The affected physical corner can change with
direction. - One value: Sets equal horizontal and vertical radii.
- Two values: Sets the horizontal radius first and vertical radius second.
- Slash syntax: A slash separator is not permitted in this individual corner property.
- Lengths: Nonnegative CSS length values are supported.
- Percentages: Horizontal percentages use the border box width, while vertical percentages use the border box height.
- Negative values: Negative radius values are invalid.
- Zero radius: If either radius is zero, the corner is not rounded.
- Large radii: Browsers reduce overlapping corner radii proportionally when necessary to fit the element.
- Border visibility: A visible border is not required for the background to follow a rounded corner.
- Background clipping: Rounded corners affect the shape used for painting backgrounds.
- Overflow: Descendant content may require overflow clipping to remain within the rounded edge.
- Layout: Rounded corners do not change the element's rectangular layout dimensions.
- Shorthand interactions: Later
border-radiusdeclarations may override the logical corner radius. - Physical properties: Logical and physical corner declarations can target the same corner, so cascade order matters.
- Animation: Compatible radius values can transition and animate.
- Browser support: Modern browsers support logical corner radius properties without vendor prefixes.
Use border-end-end-radius when a rounded corner should follow the element's logical writing direction instead of remaining fixed to a physical corner.
Browser Support
The border-end-end-radius property is supported in current versions of Chrome, Edge, Firefox, Safari, and other major browsers. It is less broadly supported in older browsers than the physical border-radius properties.
The standard property does not require vendor prefixes in modern browsers.
Standard Declaration
.panel {
border-end-end-radius: 30px;
}
Elliptical Declaration
.panel {
border-end-end-radius: 50px 20px;
}
Both declarations use standard logical corner radius syntax.
Physical Fallback
.panel {
border-bottom-right-radius: 30px;
border-end-end-radius: 30px;
}
The physical declaration provides a fallback for a horizontal left-to-right layout. Browsers that support the logical property use the later declaration. This fallback is not direction-aware in browsers that lack logical corner support.
Visit Can I Use? and search for border-end-end-radius to review browser compatibility.
Specifications
The border-end-end-radius property is defined in the CSS Logical Properties and Values Module Level 1 specification.
CSS Logical Properties and Values Module Level 1
The underlying border radius behavior is defined in the CSS Backgrounds and Borders Module Level 3 specification.
CSS Backgrounds and Borders Module Level 3
Writing modes and logical directions are defined in the CSS Writing Modes specification.
