-
Notifications
You must be signed in to change notification settings - Fork 22.7k
/
Copy pathindex.md
128 lines (94 loc) · 3.05 KB
/
index.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
---
title: border-block-end-width
slug: Web/CSS/border-block-end-width
page-type: css-property
browser-compat: css.properties.border-block-end-width
---
{{CSSRef}}
The **`border-block-end-width`** [CSS](/en-US/docs/Web/CSS) property defines the width of the logical block-end border 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 {{cssxref("border-top-width")}}, {{cssxref("border-right-width")}}, {{cssxref("border-bottom-width")}}, or {{cssxref("border-left-width")}} property depending on the values defined for {{cssxref("writing-mode")}}, {{cssxref("direction")}}, and {{cssxref("text-orientation")}}.
{{InteractiveExample("CSS Demo: border-block-end-width")}}
```css interactive-example-choice
border-block-end-width: thick;
writing-mode: horizontal-tb;
```
```css interactive-example-choice
border-block-end-width: thick;
writing-mode: vertical-rl;
```
```css interactive-example-choice
border-block-end-width: 4px;
writing-mode: horizontal-tb;
```
```css interactive-example-choice
border-block-end-width: 4px;
writing-mode: vertical-lr;
```
```html interactive-example
<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>
```
```css interactive-example
#example-element {
background-color: palegreen;
color: #000;
border: 0 solid crimson;
padding: 0.75em;
width: 80%;
height: 100px;
unicode-bidi: bidi-override;
}
```
## Syntax
```css
/* <'border-width'> values */
border-block-end-width: 5px;
border-block-end-width: thick;
/* Global values */
border-block-end-width: inherit;
border-block-end-width: initial;
border-block-end-width: revert;
border-block-end-width: revert-layer;
border-block-end-width: unset;
```
Related properties are {{cssxref("border-block-start-width")}}, {{cssxref("border-inline-start-width")}}, and {{cssxref("border-inline-end-width")}}, which define the other border widths of the element.
### Values
- `<'border-width'>`
- : The width of the border. See {{ cssxref("border-width") }}.
## Formal definition
{{CSSInfo}}
## Formal syntax
{{csssyntax}}
## Examples
### Border width with vertical text
#### HTML
```html
<div>
<p class="exampleText">Example text</p>
</div>
```
#### CSS
```css
div {
background-color: yellow;
width: 120px;
height: 120px;
}
.exampleText {
writing-mode: vertical-lr;
border: 1px solid blue;
border-block-end-width: 5px;
}
```
#### Results
{{EmbedLiveSample("Border_width_with_vertical_text", 140, 140)}}
## Specifications
{{Specifications}}
## Browser compatibility
{{Compat}}
## See also
- [CSS Logical Properties and Values](/en-US/docs/Web/CSS/CSS_logical_properties_and_values)
- This property maps to one of the physical border properties: {{cssxref("border-top-width")}}, {{cssxref("border-right-width")}}, {{cssxref("border-bottom-width")}}, and {{cssxref("border-left-width")}}
- {{cssxref("writing-mode")}}, {{cssxref("direction")}}, {{cssxref("text-orientation")}}