Tillitsdone
down Scroll to discover

CSS border-start-end-radius A Guide for Web Developers

Learn about the CSS border-start-end-radius property, its use cases, and available options.

This property allows you to define a logical border radius that adapts to different writing modes and text orientations.
thumbnail

Border Start End Radius

The border-start-end-radius property in CSS is a handy tool for web developers and designers. It lets you define a logical border radius on an element, which adjusts based on the element’s writing mode, direction, and text orientation. This makes it great for creating styles that work seamlessly across different languages and text directions.

Definition and Usage

The border-start-end-radius property is used to define a logical border radius on an element. It’s especially useful for creating styles that adapt to different writing modes, directions, and text orientations. This property affects the corner between the block-start and the inline-end sides of an element. For example, in a left-to-right (ltr) horizontal writing mode, it corresponds to the border-top-right-radius property.

Here’s a simple example:

div {
background-color: rebeccapurple;
width: 120px;
height: 120px;
border-start-end-radius: 10px;
}

Browser Compatibility

The border-start-end-radius property is widely supported across modern web browsers:

  • Google Chrome: Supported since version 89.
  • Microsoft Edge: Supported since version 89.
  • Mozilla Firefox: Supported since version 66.
  • Opera: Supported since version 75.
  • Safari: Supported since version 15.
  • Internet Explorer: Not supported.

Syntax

The border-start-end-radius property allows you to define the radius of the corner between the block-start and inline-end sides of an element. Here is the syntax:

/* Using length values */
border-start-end-radius: 10px;
border-start-end-radius: 1em;
/* Using two length values */
border-start-end-radius: 1em 2em;
/* Global values */
border-start-end-radius: inherit;
border-start-end-radius: initial;
border-start-end-radius: revert;
border-start-end-radius: revert-layer;
border-start-end-radius: unset;

Values

The border-start-end-radius property can accept various values, including lengths and percentages.

Length Values

  • Single Length Value: Creates a circular corner. For example, border-start-end-radius: 10px;.
  • Two Length Values: Creates an elliptical corner. For example, border-start-end-radius: 1em 2em;.

Percentage Values

  • Single Percentage Value: Creates a circular corner. For example, border-start-end-radius: 50%;.
  • Two Percentage Values: Creates an elliptical corner. For example, border-start-end-radius: 50% 25%;.

Global Values

  • inherit: Inherits the value from the parent element.
  • initial: Uses the initial value defined by the browser.
  • revert: Uses the default value defined by the user-agent stylesheet.
  • revert-layer: Uses the value from the next layer of the cascade.
  • unset: Behaves as if the property is not set.

Examples

Here are some practical examples of how to use the border-start-end-radius property:

/* Using length values */
border-start-end-radius: 10px; /* Creates a circular corner with a radius of 10 pixels */
border-start-end-radius: 1em; /* Creates a circular corner with a radius of 1 em */
/* Using two length values */
border-start-end-radius: 1em 2em; /* Creates an elliptical corner */
/* Using percentage values */
border-start-end-radius: 50%; /* Creates a circular corner that is half the size of the box */
border-start-end-radius: 50% 25%; /* Creates an elliptical corner */
/* Global values */
border-start-end-radius: inherit; /* Inherits the value from the parent element */
border-start-end-radius: initial; /* Uses the initial value defined by the browser */
border-start-end-radius: revert; /* Uses the default value defined by the user-agent stylesheet */
border-start-end-radius: revert-layer; /* Uses the value from the next layer of the cascade */
border-start-end-radius: unset; /* Behaves as if the property is not set */

Formal Syntax

The formal syntax for the border-start-end-radius property is as follows:

border-start-end-radius =
<length-percentage [0,]>{1,2}
<length-percentage> =
<length> | <percentage>

Explanation

  • <length-percentage>: Can be either a length value (e.g., 10px, 1em) or a percentage (e.g., 50%).
  • Single Value: Creates a circular corner.
  • Two Values: Creates an elliptical corner.

Formal Definition

The border-start-end-radius property is formally defined as a way to specify the logical border radius of an element. This property maps to a physical border radius depending on the element’s writing-mode, direction, and text-orientation.

Initial Value

The initial value for the border-start-end-radius property is 0.

Applies To

This property applies to all elements. However, user agents are not required to apply it to table and inline-table elements when border-collapse is set to collapse. The behavior on internal table elements is currently undefined. It also applies to the ::first-letter pseudo-element.

Inherited

No, this property is not inherited from parent elements.

Percentages

Percentages refer to the corresponding dimension of the border box. For the horizontal axis, percentages refer to the width of the box, and for the vertical axis, they refer to the height of the box.

Computed Value

The computed value for the border-start-end-radius property is two absolute lengths or percentages.

Animation Type

The animation type for the border-start-end-radius property is a length, percentage, or calc(). This means that the values of this property can be interpolated as real, floating-point numbers, allowing for smooth animations and transitions.

Specifications

The border-start-end-radius property is defined in the CSS Logical Properties and Values Level 1 specification. This specification outlines how to use logical properties that adapt to different writing modes and text orientations.

Relevant Specification

  • CSS Logical Properties and Values Level 1: This specification introduces logical properties, including border-start-end-radius, to create styles that work well across various writing modes and text orientations.

You can find more detailed information about the border-start-end-radius property here:

See Also

For more information, check out these resources:

Supported Browsers

The border-start-end-radius property is supported across modern web browsers:

  • Google Chrome: Supported since version 89.
  • Microsoft Edge: Supported since version 89.
  • Mozilla Firefox: Supported since version 66.
  • Opera: Supported since version 75.
  • Safari: Supported since version 15.
  • Internet Explorer: Not supported.

Examples

Here are some practical examples of using the border-start-end-radius property.

Example 1: Basic Usage

Create a circular corner on a div element.

HTML:

<div class="example">
<p>Example Text</p>
</div>

CSS:

.example {
background-color: rebeccapurple;
width: 120px;
height: 120px;
border-start-end-radius: 10px;
}

Output:

A div with a background color of rebeccapurple and a circular corner with a radius of 10 pixels.

Example 2: Elliptical Corner

Create an elliptical corner on a div element.

HTML:

<div class="example2">
<p>Example Text</p>
</div>

CSS:

.example2 {
background-color: rebeccapurple;
width: 120px;
height: 120px;
border-start-end-radius: 1em 2em;
}

Output:

A div with a background color of rebeccapurple and an elliptical corner with a semi-major axis of 1em and a semi-minor axis of 2em.

Example 3: Vertical Text with Border Radius

Create a border radius on a div element with vertical text.

HTML:

<div class="vertical-text">
<p>Example Text</p>
</div>

CSS:

.vertical-text {
background-color: rebeccapurple;
width: 120px;
height: 120px;
border-start-end-radius: 10px;
writing-mode: vertical-rl;
padding: 10px;
}

Output:

A div with vertical text and a border radius of 10 pixels. The text is oriented vertically using writing-mode: vertical-rl;.

These examples show how the border-start-end-radius property can create visually appealing designs that adapt to different writing modes and text orientations.

icons/css-4.svg CSS Blogs
CSS3 is the latest version of Cascading Style Sheets, offering advanced styling features like animations, transitions, shadows, gradients, and responsive design.
icons/logo-tid.svg

Talk with CEO

Ready to bring your web/app to life or boost your team with expert Thai developers?
Contact us today to discuss your needs, and let’s create tailored solutions to achieve your goals. We’re here to help at every step!
🖐️ Contact us
Let's keep in Touch
Thank you for your interest in Tillitsdone! Whether you have a question about our services, want to discuss a potential project, or simply want to say hello, we're here and ready to assist you.
We'll be right here with you every step of the way.
Contact Information
rick@tillitsdone.com+66824564755
Find All the Ways to Get in Touch with Tillitsdone - We're Just a Click, Call, or Message Away. We'll Be Right Here, Ready to Respond and Start a Conversation About Your Needs.
Address
9 Phahonyothin Rd, Khlong Nueng, Khlong Luang District, Pathum Thani, Bangkok Thailand
Visit Tillitsdone at Our Physical Location - We'd Love to Welcome You to Our Creative Space. We'll Be Right Here, Ready to Show You Around and Discuss Your Ideas in Person.
Social media
Connect with Tillitsdone on Various Social Platforms - Stay Updated and Engage with Our Latest Projects and Insights. We'll Be Right Here, Sharing Our Journey and Ready to Interact with You.
We anticipate your communication and look forward to discussing how we can contribute to your business's success.
We'll be here, prepared to commence this promising collaboration.
Frequently Asked Questions
Explore frequently asked questions about our products and services.
Whether you're curious about features, warranties, or shopping policies, we provide comprehensive answers to assist you.