monks/text_align

The text-align CSS property sets the horizontal alignment of the inline-level content inside a block element or table-cell box. This means it works like {{cssxref(“vertical-align”)}} but in the horizontal direction.

Values

pub const center: #(String, String)
  • : The inline contents are centered within the line box.
pub const end: #(String, String)
  • : The same as right if direction is left-to-right and left if direction is right-to-left.
pub const inherit: #(String, String)
pub const initial: #(String, String)
pub const justify: #(String, String)
  • : The inline contents are justified. Spaces out the content to line up its left and right edges to the left and right edges of the line box, except for the last line.
pub const left: #(String, String)
  • : The inline contents are aligned to the left edge of the line box.
pub const match_parent: #(String, String)
  • : Similar to inherit, but the values start and end are calculated according to the parent’s {{cssxref(“direction”)}} and are replaced by the appropriate left or right value.
pub fn raw(value: String) -> #(String, String)

Enter a raw string value for text-align

pub const revert: #(String, String)
pub const revert_layer: #(String, String)
pub const right: #(String, String)
  • : The inline contents are aligned to the right edge of the line box.
pub const start: #(String, String)
  • : The same as left if direction is left-to-right and right if direction is right-to-left.
pub const unset: #(String, String)
pub fn var(variable: String) -> #(String, String)

Enter a variable name to be used for text-align. It will be wrapped in var() and have -- prepended.

Search Document