monks/text_wrap

The text-wrap CSS shorthand property controls how text inside an element is wrapped. The different values provide:

Values

pub const auto_: #(String, String)

auto value of text-wrap

pub const balance: #(String, String)
  • : Text is wrapped in a way that best balances the number of characters on each line, enhancing layout quality and legibility. Because counting characters and balancing them across multiple lines is computationally expensive, this value is only supported for blocks of text spanning a limited number of lines (six or less for Chromium and ten or less for Firefox).
pub const inherit: #(String, String)
pub const initial: #(String, String)
pub const nowrap: #(String, String)
  • : Text does not wrap across lines. It will overflow its containing element rather than breaking onto a new line.
pub const pretty: #(String, String)
  • : Results in the same behavior as wrap, except that the user agent will use a slower algorithm that favors better layout over speed. This is intended for body copy where good typography is favored over performance (for example, when the number of orphans should be kept to a minimum).
pub fn raw(value: String) -> #(String, String)

Enter a raw string value for text-wrap

pub const revert: #(String, String)
pub const revert_layer: #(String, String)
pub const stable: #(String, String)
  • : Results in the same behavior as wrap, except that when the user is editing the content, the lines that come before the lines they are editing remain static rather than the whole block of text re-wrapping.
pub const unset: #(String, String)
pub fn var(variable: String) -> #(String, String)

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

pub const wrap: #(String, String)
  • : Text is wrapped across lines at appropriate characters (for example spaces, in languages like English that use space separators) to minimize overflow. This is the default value.
Search Document