linear-direction

Introduction

The linear-direction CSS property sets how linear items are placed in the linear container defining the main axis and the direction.

Note that the values row, row-reverse are affected by the directionality of the linear container. If its dir attribute is ltr, row represents the horizontal axis oriented from the left to the right, and row-reverse from the right to the left; if the dir attribute is rtl, row represents the axis oriented from the right to the left, and row-reverse from the left to the right.

INFO

linear-orientation is deprecated, will be removed in the future.

Examples

Syntax

linear-direction: column;

/* Like <column>, but reversed */
linear-direction: column-reverse;

linear-direction: row;

/* Like <row>, but reversed */
linear-direction: row-reverse;

Values

  • column

    Default value. The linear container's main-axis is defined to be the same as vertical direction.

  • row

    The linear container's main-axis is defined to be the same as the text direction. The main-start and main-end points are the same as the content direction.

  • column-reverse

    Behaves the same as column but the main-start and main-end are opposite to the content direction.

  • row-reverse

    Behaves the same as row but the main-start and main-end points are opposite to the content direction.

  • vertical Deprecated

    Equivalent to column.

  • horizontal Deprecated

    Equivalent to row.

  • horizontal-reverse Deprecated

    Equivalent to row-reverse.

  • vertical-reverse Deprecated

    Equivalent to column-reverse.

Formal definition

Initial valuecolumn
Applies tolinear containers
Inheritedno
Animatable

Formal syntax

linear-direction = column | row | column-reverse | row-reverse

Difference between web

  • No such style in Web.

Compatibility

LCD tables only load in the browser

Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.