border-inline-end

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The border-inline-end CSS property is a shorthand property for setting the individual logical inline-end border property values in a single place in the style sheet.

border-inline-end: 1px;
border-inline-end: 2px dashed;
border-inline-end: medium dashed blue;

border-inline-end can be used to set the values for one or more of border-inline-end-width, border-inline-end-style, and border-inline-end-color. The physical border to which it maps depends on the element's writing mode, directionality, and text orientation. It corresponds to the border-topborder-rightborder-bottom, or border-left property depending on the values defined for writing-mode, direction, and text-orientation.

Related properties are border-block-start, border-block-end, and border-inline-start, which define the other borders of the element.

Initial valueas each of the properties of the shorthand:
Applies toall elements
Inheritedno
Mediavisual
Computed valueas each of the properties of the shorthand:
Animation typediscrete
Canonical orderthe unique non-ambiguous order defined by the formal grammar

Syntax

Values

The border-inline-end is specified with one or more of the following, in any order:

<'border-width'>
The width of the border. See border-width.
<'border-style'>
The line style of the border. See border-style.
<'color'>
The color of the border. See color.

Formal syntax

<'border-width'> || <'border-style'> || <'color'>

where
<color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>

where
<rgb()> = rgb( [ [ <percentage>{3} | <number>{3} ] [ / <alpha-value> ]? ] | [ [ <percentage>#{3} | <number>#{3} ] , <alpha-value>? ] )
<rgba()> = rgba( [ [ <percentage>{3} | <number>{3} ] [ / <alpha-value> ]? ] | [ [ <percentage>#{3} | <number>#{3} ] , <alpha-value>? ] )
<hsl()> = hsl( [ <hue> <percentage> <percentage> [ / <alpha-value> ]? ] | [ <hue>, <percentage>, <percentage>, <alpha-value>? ] )
<hsla()> = hsla( [ <hue> <percentage> <percentage> [ / <alpha-value> ]? ] | [ <hue>, <percentage>, <percentage>, <alpha-value>? ] )

where
<alpha-value> = <number> | <percentage>
<hue> = <number> | <angle>

Example

HTML Content

<div>
  <p class="exampleText">Example text</p>
</div>

CSS Content

div {
  background-color: yellow;
  width: 120px;
  height: 120px;
}

.exampleText {
  writing-mode: vertical-rl;
  border-inline-end: 5px dashed blue;
}

Specification

Specification Status Comment
CSS Logical Properties and Values Level 1
The definition of 'border-inline-end' in that specification.
Editor's Draft Initial definition

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support No ?

41

381

No No No
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidIE mobileOpera AndroidiOS Safari
Basic support No ? ?

41

381

No No No

1. From version 38: this feature is behind the layout.css.vertical-text.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.

See also

Document Tags and Contributors

 Contributors to this page: teoli, mfluehr, elysdir1, Sebastianz, fscholz, jsx, kscarfone
 Last updated by: teoli,