box-direction CSS property
Deprecated
Avoid using this feature in new projects. This feature may be a candidate for removal from web standards or browsers.>
Non-standard: This feature is not standardized. We do not recommend using non-standard features in production, as they have limited browser support, and may change or be removed. However, they can be a suitable alternative in specific cases where no standard option exists.
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 for information about the current standard.
The box-direction 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
/* 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;
Values
This property is specified as one of the following keyword values:
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
| Initial value | normal |
|---|---|
| Applies to | elements with a CSS display value of box or inline-box |
| Inherited | no |
| Computed value | as specified |
| Animation type | discrete |
Formal syntax
box-direction =
normal |
reverse
Examples
>Setting box direction
.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.