CSS border-start-end-radius Property
The border-start-end-radius property rounds the corner where an element's block-start and inline-end edges meet.
Unlike physical corner properties such as border-top-right-radius, this logical property adapts to the element's writing-mode and direction. In horizontal left-to-right writing, it controls the top-right corner. In horizontal right-to-left writing, it controls the top-left corner.
You can specify one radius for a circular curve or two radii for an elliptical curve. The property is useful for multilingual layouts and components that must adapt to different writing directions.
border-start-end-radius Syntax
The property accepts one or two non-negative lengths or percentages.
selector {
border-start-end-radius: 20px;
}
The general syntax is:
selector {
border-start-end-radius: <length-percentage>{1,2};
}
One Radius
.panel {
border-start-end-radius: 20px;
}
Creates a circular corner with equal horizontal and vertical radii.
Two Radii
.panel {
border-start-end-radius: 40px 20px;
}
Creates an elliptical corner using a horizontal radius of 40 pixels and a vertical radius of 20 pixels.
Percentage Radius
.panel {
border-start-end-radius: 25%;
}
Mixed Units
.panel {
border-start-end-radius: 2rem 15%;
}
Zero Radius
.panel {
border-start-end-radius: 0;
}
Calculated Radius
.panel {
border-start-end-radius: clamp(8px, 3vw, 40px);
}
CSS-Wide Keywords
.inherited {
border-start-end-radius: inherit;
}
.reset {
border-start-end-radius: initial;
}
.unset {
border-start-end-radius: unset;
}
.reverted {
border-start-end-radius: revert;
}
.layer-reverted {
border-start-end-radius: revert-layer;
}
Negative values are invalid. The property does not use the slash-separated syntax of the border-radius shorthand.
Property Values
The border-start-end-radius property accepts one or two radius values and the standard CSS-wide keywords.
| Value | Description |
|---|---|
<length> |
Sets a circular radius using a non-negative CSS length. |
<percentage> |
Sets a radius relative to the element's dimensions. |
<length-percentage> <length-percentage> |
Sets separate horizontal and vertical radii for an elliptical corner. |
0 |
Removes the rounding from the logical start-end corner. |
inherit |
Inherits the computed radius values from the parent. |
initial |
Resets the radius to 0. |
unset |
Resets the radius to 0 because the property is not inherited. |
revert |
Reverts the property according to cascade origin rules. |
revert-layer |
Reverts the property according to cascade layer rules. |
Property Characteristics
| Characteristic | Value |
|---|---|
| Initial value | 0 |
| Inherited | No |
| Applies to | Elements that support border-radius |
| Computed value | Two absolute lengths or percentages |
| Animation type | By computed value type (two length-percentage values) |
| Percentages | Relative to the corresponding dimensions of the border box |
| Negative values | Not accepted |
| Property type | Logical corner longhand |
| Logical corner | Block-start and inline-end |
The physical corner affected by this property depends on the element's writing mode and direction.
How It Works
The browser identifies the corner where the logical block-start and inline-end edges meet, then applies the specified radii.
Step 1: Create a Box
.panel {
width: 240px;
padding: 20px;
background-color: #f3f8fc;
border: 3px solid #1769aa;
}
Step 2: Round the Logical Corner
.panel {
border-start-end-radius: 30px;
}
In horizontal left-to-right writing, the top-right corner becomes rounded.
Step 3: Change the Direction
.panel {
direction: rtl;
border-start-end-radius: 30px;
}
With horizontal right-to-left writing, the rounding moves to the top-left corner.
Step 4: Use an Elliptical Radius
.panel {
border-start-end-radius: 60px 20px;
}
The corner uses a wider horizontal curve and a shorter vertical curve.
Step 5: Remove the Rounding
.panel {
border-start-end-radius: 0;
}
The logical start-end corner becomes square.
The property changes the shape of the corner without changing the element's box dimensions.
Logical Corner Mapping
Logical corners are determined by the block and inline axes of the element.
Block-start identifies the beginning of the block axis, while inline-end identifies the end of the inline axis.
Physical Corner Mapping
| Writing Mode | Direction | Physical Corner |
|---|---|---|
horizontal-tb |
ltr |
Top-right |
horizontal-tb |
rtl |
Top-left |
vertical-rl |
ltr |
Bottom-right |
vertical-rl |
rtl |
Top-right |
vertical-lr |
ltr |
Bottom-left |
vertical-lr |
rtl |
Top-left |
Horizontal Left-to-Right
.panel {
writing-mode: horizontal-tb;
direction: ltr;
border-start-end-radius: 30px;
}
The top-right corner is rounded.
Horizontal Right-to-Left
.panel {
writing-mode: horizontal-tb;
direction: rtl;
border-start-end-radius: 30px;
}
The top-left corner is rounded.
Vertical Right-to-Left
.panel {
writing-mode: vertical-rl;
direction: ltr;
border-start-end-radius: 30px;
}
The bottom-right corner is rounded.
Logical corner properties are especially useful when the same component must work across multiple writing systems.
Circular Corners
A single value creates a circular corner by assigning the same value to both radii.
Small Radius
.panel {
border-start-end-radius: 6px;
}
Medium Radius
.panel {
border-start-end-radius: 20px;
}
Large Radius
.panel {
border-start-end-radius: 50px;
}
Relative Radius
.panel {
border-start-end-radius: 2rem;
}
Circular Corner With a Border
.panel {
border: 4px solid #1769aa;
border-start-end-radius: 30px;
}
The border follows the rounded corner.
Circular Corner Without a Border
.panel {
background-color: #1769aa;
border-start-end-radius: 30px;
}
The background is clipped to the rounded border-box corner even when no visible border is present.
Use a single value when the corner should have equal horizontal and vertical radii.
Elliptical Corners
Two values create an elliptical corner with independent horizontal and vertical radii.
Wide Horizontal Curve
.panel {
border-start-end-radius: 60px 20px;
}
The horizontal radius is 60 pixels, and the vertical radius is 20 pixels.
Tall Vertical Curve
.panel {
border-start-end-radius: 20px 60px;
}
Mixed Length Units
.panel {
border-start-end-radius: 3rem 20px;
}
Mixed Length and Percentage
.panel {
border-start-end-radius: 40px 25%;
}
Two Percentage Values
.panel {
border-start-end-radius: 40% 20%;
}
Invalid Slash Syntax
.panel {
border-start-end-radius: 40px / 20px;
}
This declaration is invalid. Use a space between the two radii.
The slash separator is used by the border-radius shorthand to separate horizontal and vertical radius lists.
Lengths and Percentages
The property accepts non-negative CSS lengths, percentages, and compatible calculated values.
Pixel Radius
.panel {
border-start-end-radius: 24px;
}
rem Radius
.panel {
border-start-end-radius: 1.5rem;
}
em Radius
.panel {
border-start-end-radius: 2em;
}
Percentage Radius
.panel {
border-start-end-radius: 25% 50%;
}
The horizontal percentage is relative to the border box width. The vertical percentage is relative to the border box height.
Viewport-Based Radius
.panel {
border-start-end-radius: 5vw;
}
Using calc()
.panel {
border-start-end-radius: calc(10px + 1rem);
}
Using clamp()
.panel {
border-start-end-radius: clamp(10px, 4vw, 50px);
}
Using min()
.panel {
border-start-end-radius: min(40px, 10%);
}
Using max()
.panel {
border-start-end-radius: max(12px, 1rem);
}
Invalid Negative Radius
.panel {
border-start-end-radius: -10px;
}
Negative radius values are invalid.
Percentages and relative units are useful for corners that should adapt to the size of the element.
Writing Mode and Direction
The writing-mode and direction properties determine which physical corner corresponds to the logical start-end corner.
Left-to-Right Layout
.panel {
writing-mode: horizontal-tb;
direction: ltr;
border-start-end-radius: 40px;
}
The top-right corner is rounded.
Right-to-Left Layout
.panel {
writing-mode: horizontal-tb;
direction: rtl;
border-start-end-radius: 40px;
}
The top-left corner is rounded.
Vertical Right-to-Left Layout
.panel {
writing-mode: vertical-rl;
direction: ltr;
border-start-end-radius: 40px;
}
The bottom-right corner is rounded.
Vertical Left-to-Right Layout
.panel {
writing-mode: vertical-lr;
direction: ltr;
border-start-end-radius: 40px;
}
The bottom-left corner is rounded.
Using the dir Attribute
<div class="panel" dir="ltr">Left-to-right content</div>
<div class="panel" dir="rtl">Right-to-left content</div>
.panel {
border: 2px solid #1769aa;
border-start-end-radius: 30px;
padding: 20px;
}
The same CSS declaration rounds different physical corners according to the element's direction.
Using logical properties reduces the need for separate left-to-right and right-to-left stylesheets.
border-radius Interactions
The border-start-end-radius property is a logical counterpart to one of the physical corner radius properties.
Physical Radius
.panel {
border-top-right-radius: 30px;
}
This always targets the physical top-right corner.
Logical Radius
.panel {
border-start-end-radius: 30px;
}
This targets the corner where block-start and inline-end meet.
Combining With border-radius
.panel {
border-radius: 10px;
border-start-end-radius: 40px;
}
In horizontal left-to-right writing, all corners initially receive a 10-pixel radius, and the top-right corner is then changed to 40 pixels.
Later Shorthand Override
.panel {
border-start-end-radius: 40px;
border-radius: 10px;
}
In horizontal left-to-right writing, the later shorthand overrides the logical radius at the top-right corner when cascade priority is otherwise equal.
Logical Corner Properties
.panel {
border-start-start-radius: 10px;
border-start-end-radius: 20px;
border-end-start-radius: 30px;
border-end-end-radius: 40px;
}
These four properties define the radii of the four logical corners.
Physical and Logical Conflicts
.panel {
direction: ltr;
border-top-right-radius: 15px;
border-start-end-radius: 45px;
}
Both declarations target the top-right corner. The later declaration wins when cascade priority is otherwise equal.
When mixing physical and logical corner properties, review the declaration order and the element's writing direction.
Backgrounds and Clipping
Rounded corners affect how an element's border and background are painted.
Rounded Background
.panel {
background-color: #1769aa;
border-start-end-radius: 40px;
}
The background follows the rounded border-box corner.
Rounded Border
.panel {
border: 5px solid #1769aa;
border-start-end-radius: 40px;
}
The border follows the curved corner.
Background Clip
.panel {
border: 5px solid #1769aa;
background-color: #dceefa;
background-clip: padding-box;
border-start-end-radius: 40px;
}
The background is clipped to the padding box rather than extending beneath the border.
Clipping Child Content
.panel {
border-start-end-radius: 40px;
overflow: hidden;
}
The rounded clipping edge can prevent child content from extending outside the curved corner.
Rounded Image Container
.image-panel {
border-start-end-radius: 50px;
overflow: hidden;
}
.image-panel img {
display: block;
width: 100%;
height: auto;
}
The image is clipped to the rounded shape of its container.
Rounded corners do not automatically clip every descendant. Use an appropriate clipping or overflow method when child content must follow the curve.
Radius Overlap
Large corner radii may overlap when the combined radii exceed the available width or height of an element.
Large Radius
.panel {
width: 120px;
height: 80px;
border-start-end-radius: 100px;
}
The browser may reduce the effective radii to fit the element's border box.
Multiple Large Corners
.panel {
width: 160px;
height: 100px;
border-radius: 80px;
}
The browser proportionally scales overlapping radii so the corner curves fit without overlapping.
Logical Radius With Other Corners
.panel {
width: 180px;
height: 100px;
border-radius: 20px;
border-start-end-radius: 100px;
}
The effective corner radii depend on the available dimensions and the radii assigned to adjacent corners.
Percentage Radius
.panel {
width: 200px;
height: 100px;
border-start-end-radius: 50%;
}
The horizontal and vertical radii are calculated from different dimensions of the border box.
Browsers automatically adjust overlapping radii according to the CSS border-radius rules. This prevents rounded corners from extending beyond the available edges.
Cascade and Overrides
The CSS cascade determines which radius applies when multiple declarations affect the same logical or physical corner.
Later Declaration
.panel {
border-start-end-radius: 10px;
border-start-end-radius: 30px;
}
The later 30-pixel value wins when cascade priority is otherwise equal.
Higher Specificity
.panel {
border-start-end-radius: 10px;
}
.panel.featured {
border-start-end-radius: 40px;
}
Physical Property Override
.panel {
direction: ltr;
border-start-end-radius: 40px;
border-top-right-radius: 10px;
}
Both declarations target the top-right corner, so the later physical declaration wins at equal cascade priority.
Logical Property Override
.panel {
direction: ltr;
border-top-right-radius: 10px;
border-start-end-radius: 40px;
}
The later logical declaration wins.
CSS Layers
@layer base, components;
@layer base {
.panel {
border-start-end-radius: 10px;
}
}
@layer components {
.panel {
border-start-end-radius: 40px;
}
}
For normal declarations, the later layer takes precedence.
Resetting the Radius
.panel {
border-start-end-radius: 40px;
}
.panel.square {
border-start-end-radius: 0;
}
Check the cascade and logical-to-physical mapping when a corner radius appears to be overridden unexpectedly.
CSS Custom Properties
Custom properties can store reusable corner radius values for components and themes.
Shared Radius
:root {
--corner-radius: 24px;
}
.panel {
border-start-end-radius: var(--corner-radius);
}
Radius With Fallback
.panel {
border-start-end-radius: var(--corner-radius, 20px);
}
Component Variants
.card {
--card-radius: 20px;
border-start-end-radius: var(--card-radius);
}
.card.featured {
--card-radius: 40px;
}
.card.compact {
--card-radius: 8px;
}
Elliptical Radius Variables
:root {
--radius-x: 50px;
--radius-y: 20px;
}
.panel {
border-start-end-radius: var(--radius-x) var(--radius-y);
}
Calculated Radius
:root {
--base-radius: 12px;
}
.panel {
border-start-end-radius: calc(var(--base-radius) * 2);
}
Responsive Custom Property
:root {
--panel-radius: 40px;
}
@media (max-width: 600px) {
:root {
--panel-radius: 16px;
}
}
.panel {
border-start-end-radius: var(--panel-radius);
}
Custom properties help maintain consistent logical corner shapes throughout a design.
Interactive States
The logical start-end corner can change in response to hover, focus, and component states.
Hover State
.card {
border-start-end-radius: 12px;
}
.card:hover {
border-start-end-radius: 40px;
}
Focus State
.control {
border-start-end-radius: 8px;
}
.control:focus-visible {
border-start-end-radius: 24px;
outline: 2px solid #1769aa;
outline-offset: 2px;
}
Selected Component
.card {
border-start-end-radius: 12px;
}
.card.is-selected {
border-start-end-radius: 40px;
}
Current Navigation Item
.nav-link {
border-start-end-radius: 0;
}
.nav-link[aria-current="page"] {
border-start-end-radius: 20px;
}
Expanded Panel
.accordion-panel {
border-start-end-radius: 12px;
}
.accordion-panel[open] {
border-start-end-radius: 30px;
}
Rounded corners can reinforce component states, but important states should also have clear visual or semantic indicators.
Transitions and Animation
The border-start-end-radius property supports transitions and animations between compatible radius values.
Basic Transition
.panel {
border-start-end-radius: 10px;
transition: border-start-end-radius 0.3s ease;
}
.panel:hover {
border-start-end-radius: 50px;
}
Elliptical Radius Transition
.panel {
border-start-end-radius: 20px 10px;
transition: border-start-end-radius 0.4s ease;
}
.panel:hover {
border-start-end-radius: 60px 30px;
}
Keyframe Animation
@keyframes logical-corner-change {
from {
border-start-end-radius: 0;
}
to {
border-start-end-radius: 60px;
}
}
.animated-panel {
animation: logical-corner-change 2s ease-in-out infinite alternate;
}
Multiple Radius Stops
@keyframes corner-shape-change {
0% {
border-start-end-radius: 10px;
}
50% {
border-start-end-radius: 60px 20px;
}
100% {
border-start-end-radius: 20px 60px;
}
}
.animated-panel {
animation: corner-shape-change 4s ease-in-out infinite;
}
Reduced Motion Preference
.panel {
border-start-end-radius: 10px;
transition: border-start-end-radius 0.3s ease;
}
.panel:hover {
border-start-end-radius: 40px;
}
@media (prefers-reduced-motion: reduce) {
.panel {
transition: none;
}
}
Animating a corner radius changes its shape without changing the element's declared width or height.
Responsive Design
The logical start-end radius can adapt to viewport size, container dimensions, and writing direction.
Media Query
.panel {
border-start-end-radius: 50px;
}
@media (max-width: 600px) {
.panel {
border-start-end-radius: 20px;
}
}
Container Query
.panel-container {
container-type: inline-size;
}
.panel {
border-start-end-radius: 12px;
}
@container (min-width: 500px) {
.panel {
border-start-end-radius: 40px;
}
}
Fluid Radius
.panel {
border-start-end-radius: clamp(12px, 4vw, 60px);
}
Percentage Radius
.panel {
border-start-end-radius: 25%;
}
Responsive Elliptical Radius
.panel {
border-start-end-radius: 60px 30px;
}
@media (max-width: 600px) {
.panel {
border-start-end-radius: 24px 12px;
}
}
Direction-Aware Component
.card {
border-start-end-radius: 30px;
}
The same declaration automatically targets the appropriate physical corner when the element's writing direction changes.
Logical corner properties reduce the need for separate physical corner overrides in responsive and multilingual layouts.
Practical Uses
The border-start-end-radius property is useful for cards, navigation elements, labels, panels, and other components that need direction-aware rounded corners.
Content Card
.content-card {
padding: 20px;
background-color: #f3f8fc;
border: 2px solid #1769aa;
border-start-end-radius: 40px;
}
Featured Panel
.featured-panel {
padding: 24px;
background-color: #1769aa;
color: #ffffff;
border-start-end-radius: 60px;
}
Navigation Tab
.nav-tab {
display: inline-block;
padding: 12px 20px;
background-color: #dceefa;
border-start-end-radius: 20px;
}
Notification Box
.notification {
padding: 16px;
border: 2px solid #1769aa;
background-color: #f3f8fc;
border-start-end-radius: 30px;
}
Image Card
.image-card {
border-start-end-radius: 50px;
overflow: hidden;
}
.image-card img {
display: block;
width: 100%;
height: auto;
}
Direction-Aware Label
.label {
display: inline-block;
padding: 8px 14px;
background-color: #1769aa;
color: #ffffff;
border-start-end-radius: 18px;
}
Asymmetric Component
.asymmetric-panel {
border-start-start-radius: 8px;
border-start-end-radius: 40px;
border-end-start-radius: 8px;
border-end-end-radius: 8px;
}
Use logical corner radii when a component's shape should follow the direction of its content rather than remain tied to a physical corner.
border-start-end-radius Example
The following example demonstrates how the logical start-end corner changes with writing direction and writing mode.
<div class="border-start-end-radius-demo">
<div class="demo-box horizontal-ltr">horizontal-tb / ltr</div>
<div class="demo-box horizontal-rtl">horizontal-tb / rtl</div>
<div class="demo-box vertical-rl-ltr">vertical-rl / ltr</div>
<div class="demo-box vertical-lr-ltr">vertical-lr / ltr</div>
<div class="demo-box elliptical">60px 20px</div>
<div class="demo-box square">0</div>
</div>
.border-start-end-radius-demo {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 20px;
}
.border-start-end-radius-demo .demo-box {
box-sizing: border-box;
min-height: 140px;
padding: 20px;
border: 3px solid #1769aa;
background-color: #f3f8fc;
color: #173b5e;
font-weight: bold;
border-start-end-radius: 45px;
}
.border-start-end-radius-demo .horizontal-ltr {
writing-mode: horizontal-tb;
direction: ltr;
}
.border-start-end-radius-demo .horizontal-rtl {
writing-mode: horizontal-tb;
direction: rtl;
}
.border-start-end-radius-demo .vertical-rl-ltr {
writing-mode: vertical-rl;
direction: ltr;
}
.border-start-end-radius-demo .vertical-lr-ltr {
writing-mode: vertical-lr;
direction: ltr;
}
.border-start-end-radius-demo .elliptical {
border-start-end-radius: 60px 20px;
}
.border-start-end-radius-demo .square {
border-start-end-radius: 0;
}
The first box rounds the top-right corner, while the second rounds the top-left corner. The vertical writing examples round the bottom-right and bottom-left corners.
The elliptical example uses different horizontal and vertical radii, and the final example removes the rounding entirely.
Important Considerations
Keep the following points in mind when using border-start-end-radius:
- Purpose: Rounds the logical block-start and inline-end corner.
- Initial value:
0. - Inheritance: The property is not inherited.
- Property type: Logical corner longhand.
- One value: Creates a circular corner.
- Two values: Creates an elliptical corner.
- Accepted units: Non-negative CSS lengths and percentages.
- Percentages: Horizontal and vertical radii use the corresponding border box dimensions.
- Negative values: Not accepted.
- Zero: Removes rounding from the logical corner.
- Writing mode: Determines the physical block-start edge.
- Direction: Determines the physical inline-end edge.
- Physical mapping: Can target different physical corners depending on writing mode and direction.
- Shorthand interaction: The
border-radiusshorthand can override the corresponding corner radius. - Backgrounds: Follow the rounded border-box shape.
- Clipping: Child content may require additional clipping.
- Overlapping radii: Browsers scale radii when necessary to prevent overlap.
- Custom properties: Can store reusable radius values.
- Responsive design: Supports media queries, container queries, and calculated values.
- Animation: Supports interpolation between compatible radius values.
- Browser support: Supported in current major browsers.
Use border-start-end-radius when a rounded corner should adapt automatically to the element's writing mode and direction.
Browser Support
The border-start-end-radius property is supported in current versions of Chrome, Edge, Firefox, Safari, and other major browsers.
It is part of the CSS Logical Properties and Values specification. Older browser versions may lack support for logical corner radius properties.
.panel {
border-top-right-radius: 30px;
border-start-end-radius: 30px;
}
The physical declaration can provide a fallback for horizontal left-to-right layouts. The logical declaration is used by browsers that support it.
For current compatibility details, visit Can I Use? and search for border-start-end-radius.
Specifications
The border-start-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 specification defines logical corner mappings and their relationship to the physical border-radius properties.
