monks/text_wrap
The text-wrap CSS shorthand property controls how text inside an element is wrapped. The different values provide:
- Typographic improvements, for example more balanced line lengths across broken headings
- A way to turn text wrapping off completely.
Values
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 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 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 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.