monks/hyphens

The hyphens CSS property specifies how words should be hyphenated when text wraps across multiple lines. It can prevent hyphenation entirely, hyphenate at manually-specified points within the text, or let the browser automatically insert hyphens where appropriate.

Values

pub const auto_: #(String, String)
  • : The browser is free to automatically break words at appropriate hyphenation points, following whatever rules it chooses. However, suggested line break opportunities (see Suggesting line break opportunities below) will override automatic break point selection when present.> [!NOTE]> The auto setting’s behavior depends on the language being properly tagged to select the appropriate hyphenation rules. You must specify a language using the lang HTML attribute to guarantee that automatic hyphenation is applied in that language.> [!NOTE]> If you apply word-break: break-all then no hyphens are shown, even if the word breaks at a hyphenation point.
pub const inherit: #(String, String)
pub const initial: #(String, String)
pub const manual: #(String, String)
  • : Default value. Words are broken for line-wrapping only where characters inside the word suggest line break opportunities. See Suggesting line break opportunities below for details.
pub const none: #(String, String)
  • : Words are not broken at line breaks, even if characters inside the words suggest line break points. Lines will only wrap at whitespace.
pub fn raw(value: String) -> #(String, String)

Enter a raw string value for hyphens

pub const revert: #(String, String)
pub const revert_layer: #(String, String)
pub const unset: #(String, String)
pub fn var(variable: String) -> #(String, String)

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

Search Document