-
Notifications
You must be signed in to change notification settings - Fork 22.4k
/
index.md
89 lines (62 loc) · 2.18 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
---
title: box-direction
slug: Web/CSS/box-direction
page-type: css-property
status:
- deprecated
- non-standard
browser-compat: css.properties.box-direction
---
{{CSSRef}}{{Non-standard_header}}{{Deprecated_Header}}
> **Warning:** This is a property of the original CSS Flexible Box Layout Module draft, and has been replaced by a newer standard. The `-moz-box-direction` will only be used for XUL while the previous standard `box-direction` has been replaced by `flex-direction`. See [flexbox](/en-US/docs/Web/CSS/CSS_flexible_box_layout/Basic_concepts_of_flexbox) for information about the current standard.
The **`box-direction`** [CSS](/en-US/docs/Web/CSS) property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge).
## Syntax
```css
/* Keyword values */
box-direction: normal;
box-direction: reverse;
/* Global values */
box-direction: inherit;
box-direction: initial;
box-direction: revert;
box-direction: revert-layer;
box-direction: unset;
```
The `box-direction` property is specified as one of the keyword values listed below.
### Values
- `normal`
- : The box lays out its contents from the start (the left or top edge).
- `reverse`
- : The box lays out its contents from the end (the right or bottom edge).
## Notes
The edge of the box designated the _start_ for layout purposes depends on the box's orientation:
- For horizontal elements, the _start_ is the top edge.
- For vertical elements, the _start_ is the left edge.
The edge opposite to the start is designated the _end_.
If the direction is set using the element's `dir` attribute, then the style is ignored.
## Formal definition
{{cssinfo}}
## Formal syntax
```plain
box-direction =
normal | reverse | inherit
```
## Examples
### Setting box direction
```css
.example {
/* bottom-to-top layout */
-moz-box-direction: reverse; /* Mozilla */
-webkit-box-direction: reverse; /* WebKit */
box-direction: reverse; /* As specified */
}
```
## Specifications
Not part of any standard.
## Browser compatibility
{{Compat}}
## See also
- {{CSSxRef("box-orient")}}
- {{CSSxRef("box-pack")}}
- {{CSSxRef("box-align")}}
- {{CSSxRef("flex-direction")}}