CSS border-end-start-radius Property
The border-end-start-radius property rounds the corner where an element's block-end and inline-start edges meet.
It is a logical corner property that adapts to the element's writing-mode and direction. Unlike physical properties such as border-bottom-left-radius, it does not always target the same physical corner. One or two radius values can be used to create circular or elliptical corners.
border-end-start-radius Syntax
selector {
border-end-start-radius: 24px;
}
The property accepts one or two nonnegative length or percentage values.
.circular {
border-end-start-radius: 24px;
}
.elliptical {
border-end-start-radius: 50px 20px;
}
.percentage {
border-end-start-radius: 25%;
}
.mixed {
border-end-start-radius: 30% 20px;
}
A single value sets equal horizontal and vertical radii. With two values, the first specifies the horizontal radius and the second specifies the vertical radius.
CSS-Wide Keywords
.inherited {
border-end-start-radius: inherit;
}
.reset {
border-end-start-radius: initial;
}
.unset {
border-end-start-radius: unset;
}
.reverted {
border-end-start-radius: revert;
}
.layer-reverted {
border-end-start-radius: revert-layer;
}
CSS-wide keywords must be used alone and cannot be combined with radius values.
Property Values
| Value | Description |
|---|---|
<length> |
Specifies a nonnegative radius using a CSS length, such as px, rem, or em. |
<percentage> |
Specifies 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 rounding from the logical end-start corner. This is the initial value. |
CSS-Wide Keywords
| Keyword | Behavior |
|---|---|
inherit |
Uses 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 support animation.
How It Works
The border-end-start-radius property identifies a corner using logical directions rather than fixed physical sides.
- Block-end: The edge where the block flow ends.
- Inline-start: The edge where the inline text flow begins.
The corner where these two edges meet receives the specified radius.
Basic Logical Corner
.panel {
width: 240px;
padding: 20px;
border: 3px solid #1769aa;
border-end-start-radius: 30px;
}
In a left-to-right horizontal writing mode, the bottom-left corner is rounded.
Changing Text Direction
.panel {
direction: rtl;
border: 3px solid #1769aa;
border-end-start-radius: 30px;
}
In a right-to-left horizontal writing mode, the bottom-right corner is rounded.
Changing Writing Mode
.panel {
writing-mode: vertical-rl;
direction: ltr;
border: 3px solid #1769aa;
border-end-start-radius: 30px;
}
In this vertical writing mode, block-end is the left edge and inline-start is the top edge. The top-left corner is rounded.
No Layout Dimension Change
Rounding the corner changes its painted shape but does not change the element's rectangular layout dimensions.
The property can affect both borders and backgrounds, even when no visible border is specified.
Logical Corner Mapping
The physical corner affected by border-end-start-radius depends on the element's writing mode and direction.
| Writing Mode | Direction | Physical Corner |
|---|---|---|
horizontal-tb |
ltr |
Bottom-left |
horizontal-tb |
rtl |
Bottom-right |
vertical-rl |
ltr |
Top-left |
vertical-rl |
rtl |
Bottom-left |
vertical-lr |
ltr |
Top-right |
vertical-lr |
rtl |
Bottom-right |
Horizontal Left-to-Right
.panel {
writing-mode: horizontal-tb;
direction: ltr;
border-end-start-radius: 30px;
}
The bottom-left corner is rounded.
Horizontal Right-to-Left
.panel {
writing-mode: horizontal-tb;
direction: rtl;
border-end-start-radius: 30px;
}
The bottom-right corner is rounded.
Vertical Right-to-Left Block Flow
.panel {
writing-mode: vertical-rl;
direction: ltr;
border-end-start-radius: 30px;
}
The top-left corner is rounded.
Vertical Left-to-Right Block Flow
.panel {
writing-mode: vertical-lr;
direction: ltr;
border-end-start-radius: 30px;
}
The top-right corner is rounded.
Logical corner properties allow the same component styles to adapt to different writing systems without manually changing physical corner declarations.
Circular and Elliptical Corners
The property supports both circular and elliptical corner shapes.
Circular Corner
.panel {
border-end-start-radius: 30px;
}
A single value sets equal horizontal and vertical radii, producing a circular quarter-curve when sufficient space is available.
Wide Elliptical Corner
.panel {
border-end-start-radius: 60px 20px;
}
The horizontal radius is 60 pixels and the vertical radius is 20 pixels, producing a wider curve.
Tall Elliptical Corner
.panel {
border-end-start-radius: 20px 60px;
}
The horizontal radius is 20 pixels and the vertical radius is 60 pixels, producing a taller curve.
Zero Radius
.panel {
border-end-start-radius: 0;
}
The logical end-start corner becomes square.
One Radius Set to Zero
.panel {
border-end-start-radius: 40px 0;
}
If either radius is zero, the corner is not rounded.
Correct Two-Value Syntax
.valid {
border-end-start-radius: 40px 20px;
}
.invalid {
border-end-start-radius: 40px / 20px;
}
The two values are separated by a space. A slash separator is not permitted in this individual corner property.
Lengths and Percentages
Radius values can use absolute lengths, relative lengths, percentages, and supported CSS math functions.
Pixel Values
.panel {
border-end-start-radius: 24px;
}
Pixel values provide a consistent specified radius independent of the element's size, unless overlapping corner radii must be reduced.
Relative Lengths
.panel {
border-end-start-radius: 1.5rem;
}
The rem unit is relative to the root element's font size.
Percentage Values
.panel {
border-end-start-radius: 25%;
}
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-start-radius: 30% 20px;
}
The horizontal radius uses 30% of the border box width. The vertical radius is 20 pixels.
Using calc()
.panel {
border-end-start-radius: calc(12px + 2vw);
}
The calc() function combines length values into a calculated radius.
Using clamp()
.panel {
border-end-start-radius: clamp(12px, 4vw, 48px);
}
The radius adjusts with the viewport while remaining within the specified minimum and maximum.
Using Custom Properties
:root {
--logical-corner-radius: 28px;
}
.panel {
border-end-start-radius: var(--logical-corner-radius);
}
Custom properties allow a radius value to be reused and updated across multiple components.
Invalid Negative Values
.invalid {
border-end-start-radius: -10px;
}
Negative radius values are invalid, so the browser ignores the declaration.
Writing Mode and Direction
Logical corner properties respond to writing mode and text direction. This makes them useful for interfaces that support different languages and layouts.
Left-to-Right Content
.message {
writing-mode: horizontal-tb;
direction: ltr;
border-end-start-radius: 24px;
}
The bottom-left corner is rounded.
Right-to-Left Content
.message {
writing-mode: horizontal-tb;
direction: rtl;
border-end-start-radius: 24px;
}
The bottom-right corner is rounded.
Vertical Text
.vertical-panel {
writing-mode: vertical-rl;
direction: ltr;
border-end-start-radius: 24px;
}
The top-left corner is rounded because that is where block-end and inline-start meet.
Direction-Aware Component
.message-card {
border: 2px solid #1769aa;
border-end-start-radius: 36px;
}
The same declaration works in left-to-right and right-to-left layouts. The rounded corner automatically moves to the appropriate physical side.
Using the HTML dir Attribute
<div dir="ltr" class="message-card">
Left-to-right content
</div>
<div dir="rtl" class="message-card">
Right-to-left content
</div>
The HTML dir attribute establishes text direction, which affects the mapping of logical corner properties.
Use the appropriate document language and direction rather than changing direction only to reposition a decorative corner.
Border-Radius Shorthand
The border-radius shorthand controls all four physical corners. The border-end-start-radius property controls one logical corner.
Overriding One Corner
.panel {
border-radius: 16px;
border-end-start-radius: 40px;
}
All four corners initially receive a 16-pixel radius. The logical end-start corner receives a 40-pixel radius.
Making One Corner Square
.panel {
border-radius: 20px;
border-end-start-radius: 0;
}
Three corners remain rounded while the logical end-start corner becomes square.
Shorthand After Logical Longhand
.panel {
border-end-start-radius: 40px;
border-radius: 12px;
}
The later shorthand assigns a 12-pixel radius to all four corners, overriding the earlier logical corner value.
Elliptical Shorthand
.panel {
border-radius: 20px / 10px;
border-end-start-radius: 50px 20px;
}
The shorthand sets elliptical radii for all corners. The logical longhand then changes the end-start corner to its own horizontal and vertical radii.
Physical Corner Equivalent
.physical {
border-bottom-left-radius: 30px;
}
.logical {
writing-mode: horizontal-tb;
direction: ltr;
border-end-start-radius: 30px;
}
Both declarations round the bottom-left corner in a horizontal left-to-right writing mode.
The physical property always targets the bottom-left corner. The logical property changes its target when the writing mode or direction changes.
Avoiding Conflicting Declarations
.panel {
border-bottom-left-radius: 20px;
border-end-start-radius: 40px;
}
In a horizontal left-to-right layout, both declarations target the bottom-left corner. Assuming equal cascade priority, the later logical declaration wins.
Use logical properties consistently when the corner should follow writing direction, and use physical properties when a corner must remain fixed.
Borders and Backgrounds
The property changes the shape of the affected corner when borders and backgrounds are painted.
Visible Border
.panel {
border: 4px solid #1769aa;
border-end-start-radius: 36px;
}
The border follows the rounded logical corner.
Background Without a Border
.panel {
background-color: #e8f2fb;
border-end-start-radius: 36px;
}
The background follows the rounded corner even when the border is not visible.
Border and Background Together
.panel {
border: 3px solid #1769aa;
background-color: #e8f2fb;
border-end-start-radius: 36px;
}
The border and background share the same corner shape.
Background Clipping
.panel {
border: 8px solid rgb(23 105 170 / 50%);
background-color: #e8f2fb;
background-clip: padding-box;
border-end-start-radius: 36px;
}
The background is clipped to the padding box instead of extending beneath the border.
Clipping Descendant Content
.panel {
border-end-start-radius: 36px;
overflow: hidden;
}
When descendant content extends beyond the rounded edge, overflow: hidden can clip it to the element's padding edge.
Overflow clipping may also hide content that needs to extend outside the element, such as menus, shadows, or focus indicators.
Large Radius Values
.panel {
border-radius: 40px;
border-end-start-radius: 120px;
}
If the corner radii overlap or exceed the available space, the browser reduces them proportionally to fit the element.
Responsive Radius Values
Responsive radius values help the corner shape adapt to different component sizes and layouts.
Percentage-Based Radius
.responsive-panel {
border-end-start-radius: 20%;
}
The radius changes with the element's border box dimensions.
Viewport-Based Radius
.responsive-panel {
border-end-start-radius: 4vw;
}
The radius changes according to the viewport width.
Clamped Radius
.responsive-panel {
border-end-start-radius: clamp(16px, 5vw, 60px);
}
The radius grows with the viewport while remaining between 16 and 60 pixels.
Media Query Adjustment
.responsive-panel {
border-end-start-radius: 48px;
}
@media (max-width: 600px) {
.responsive-panel {
border-end-start-radius: 20px;
}
}
The corner radius becomes smaller on narrow screens.
Container Query Adjustment
.panel-container {
container-type: inline-size;
}
.responsive-panel {
border-end-start-radius: 20px;
}
@container (min-width: 500px) {
.responsive-panel {
border-end-start-radius: 48px;
}
}
The radius changes according to the width of the query container rather than the viewport.
Responsive radii can preserve the visual proportions of a component as its dimensions change.
Transitions and Animation
The border-end-start-radius property supports transitions and animations between compatible radius values.
Hover Transition
.animated-panel {
border: 3px solid #1769aa;
border-end-start-radius: 12px;
transition: border-end-start-radius 300ms ease;
}
.animated-panel:hover {
border-end-start-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-start-radius: 20px 20px;
transition: border-end-start-radius 300ms ease;
}
.animated-panel:hover {
border-end-start-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-start-radius: 12px;
animation: end-start-corner-change 2s ease-in-out infinite alternate;
}
@keyframes end-start-corner-change {
from {
border-end-start-radius: 12px;
}
to {
border-end-start-radius: 60px;
}
}
@media (prefers-reduced-motion: reduce) {
.animated-panel {
animation: none;
}
}
The corner alternates between smaller and larger radii.
Animating a corner radius changes the element's painted shape without changing its rectangular layout dimensions.
Practical Uses
The border-end-start-radius property is useful for creating asymmetric corners in components that support different writing directions.
Message Card
.message-card {
padding: 20px;
border: 2px solid #1769aa;
border-radius: 16px;
border-end-start-radius: 40px;
background-color: #e8f2fb;
}
One logical corner receives a larger radius than the others.
Directional Callout
.callout {
padding: 16px;
border: 2px solid #1769aa;
border-end-start-radius: 36px;
background-color: #f3f8fc;
}
The rounded corner follows the block-end and inline-start directions.
Asymmetric Button
.action-button {
padding: 12px 20px;
border: 2px solid #1769aa;
border-radius: 8px;
border-end-start-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-start-radius: 40px;
}
.localized-panel[dir="rtl"] {
direction: rtl;
}
In horizontal writing mode, the radius affects the bottom-left corner in LTR and the bottom-right corner in RTL.
Square One Logical Corner
.feature-card {
border-radius: 20px;
border-end-start-radius: 0;
}
Three corners remain rounded while the logical end-start corner becomes square.
Reusable Radius Variable
:root {
--card-corner-radius: 32px;
}
.feature-card {
border-radius: 12px;
border-end-start-radius: var(--card-corner-radius);
}
The custom property provides a reusable radius for components with the same asymmetric corner design.
border-end-start-radius Example
The following example demonstrates how the same logical radius affects different physical corners in horizontal and vertical writing modes.
<div class="logical-radius-demo">
<div class="demo-item">
<h3>Horizontal LTR</h3>
<div class="demo-box horizontal-ltr">End-Start</div>
</div>
<div class="demo-item">
<h3>Horizontal RTL</h3>
<div class="demo-box horizontal-rtl">End-Start</div>
</div>
<div class="demo-item">
<h3>Vertical RL</h3>
<div class="demo-box vertical-rl">End-Start</div>
</div>
<div class="demo-item">
<h3>Vertical LR</h3>
<div class="demo-box vertical-lr">End-Start</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-start-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-left corner.
The horizontal RTL example rounds the bottom-right corner.
The vertical-rl example rounds the top-left corner, while the vertical-lr example rounds the top-right corner.
All four examples use border-end-start-radius: 50px. The different corner positions result from their writing modes and directions.
Important Considerations
Keep the following points in mind when using border-end-start-radius:
- Logical corner: Rounds the corner where block-end and inline-start 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.
- Border visibility: A visible border is not required for the background to follow a rounded corner.
- Background clipping: Rounded corners affect background painting.
- Overflow: Descendant content may require overflow clipping to remain within the rounded edge.
- Layout: Corner rounding does 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 the cascade matters.
- Animation: Compatible radius values can transition and animate.
- Browser support: Modern browsers support logical corner radius properties without vendor prefixes.
Use border-end-start-radius when the rounded corner should follow the element's logical writing direction rather than remain fixed to a physical corner.
Browser Support
The border-end-start-radius property is supported in current versions of Chrome, Edge, Firefox, Safari, and other major browsers. Older browsers may support physical border-radius properties without supporting logical corner radius properties.
The standard property does not require vendor prefixes in modern browsers.
Standard Declaration
.panel {
border-end-start-radius: 30px;
}
Elliptical Declaration
.panel {
border-end-start-radius: 50px 20px;
}
Both declarations use standard logical corner radius syntax.
Physical Fallback
.panel {
border-bottom-left-radius: 30px;
border-end-start-radius: 30px;
}
The physical declaration provides a fallback for a horizontal left-to-right layout. Browsers supporting the logical property apply the later declaration. This fallback does not adapt automatically to other writing directions in older browsers.
Visit Can I Use? and search for border-end-start-radius to review browser compatibility.
Specifications
The border-end-start-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.
