border-block-width CSS propertyThe border-block-width CSS property defines the width of the logical block borders of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the border-top-width and border-bottom-width, or border-left-width, and border-right-width property depending on the values defined for writing-mode, direction, and text-orientation.
The border width in the other dimension can be set with border-inline-width, which sets border-inline-start-width, and border-inline-end-width.
border-block-width: thick;
writing-mode: horizontal-tb;border-block-width: thick;
writing-mode: vertical-rl;border-block-width: 4px;
writing-mode: horizontal-tb;
direction: rtl;<section class="default-example" id="default-example">
<div class="transition-all" id="example-element">
This is a box with a border around it.
</div>
</section>#example-element {
background-color: palegreen;
color: black;
border: 0 solid crimson;
padding: 0.75em;
width: 80%;
height: 100px;
unicode-bidi: bidi-override;
}/* <'line-width'> values */
border-block-width: 5px;
border-block-width: thick;
/* Global values */
border-block-width: inherit;
border-block-width: initial;
border-block-width: revert;
border-block-width: revert-layer;
border-block-width: unset;<line-width>Defines the width of the border, either as an explicit non-negative <length> or the keywords: thin, medium, or thick. The default is medium.
| Initial value | as each of the properties of the shorthand:
|
|---|---|
| Applies to | all elements |
| Inherited | no |
| Computed value | as each of the properties of the shorthand:
|
| Animation type | as each of the properties of the shorthand:
|
border-block-width =
<'border-top-width'>{1,2}
<border-top-width> =
<line-width>
<line-width> =
<length [0,∞]> |
hairline |
thin |
medium |
thick
<div>
<p class="exampleText">Example text</p>
</div>div {
background-color: yellow;
width: 120px;
height: 120px;
}
.exampleText {
writing-mode: vertical-lr;
border: 1px solid blue;
border-block-width: 5px;
}border-top-width, border-right-width, border-bottom-width, and border-left-widthwriting-mode, direction, text-orientation