border-block-end-style
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.
Theborder-block-end-styleCSS property defines the style of the logical block-end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to theborder-top-style,border-right-style,border-bottom-style, orborder-left-style property depending on the values defined forwriting-mode,direction, andtext-orientation.
In this article
Try it
border-block-end-style: dotted;writing-mode: horizontal-tb;border-block-end-style: dotted;writing-mode: vertical-rl;border-block-end-style: groove;writing-mode: horizontal-tb;border-block-end-style: dashed;writing-mode: vertical-lr;<section> <div> This is a box with a border around it. </div></section>#example-element { background-color: #eeeeee; color: black; border: 0.75em solid; padding: 0.75em; width: 80%; height: 100px; unicode-bidi: bidi-override;}Syntax
/* <'border-style'> values */border-block-end-style: dashed;border-block-end-style: dotted;border-block-end-style: groove;/* Global values */border-block-end-style: inherit;border-block-end-style: initial;border-block-end-style: revert;border-block-end-style: revert-layer;border-block-end-style: unset;Related properties areborder-block-start-style,border-inline-start-style, andborder-inline-end-style, which define the other border styles of the element.
Values
<'border-style'>The line style of the border. See
border-style.
Formal definition
| Initial value | none |
|---|---|
| Applies to | all elements |
| Inherited | no |
| Computed value | as specified |
| Animation type | discrete |
Formal syntax
border-block-end-style =
<line-style>
<line-style> =
none|
hidden|
dotted|
dashed|
solid|
double|
groove|
ridge|
inset|
outset
Examples
>Dashed border with vertical text
HTML
<div> <p>Example text</p></div>CSS
div { background-color: yellow; width: 120px; height: 120px;}.exampleText { writing-mode: vertical-lr; border: 5px solid blue; border-block-end-style: dashed;}Results
Specifications
| Specification |
|---|
| CSS Logical Properties and Values Level 1> # border-style> |
Browser compatibility
Loading…
See also
- CSS Logical Properties and Values
- This property maps to one of the physical border properties:
border-top-style,border-right-style,border-bottom-style, andborder-left-style. writing-mode,direction,text-orientation