pub struct TextStyle {Show 30 fields
pub color: Option<Color>,
pub font_size: Option<Points>,
pub font_weight: Option<u16>,
pub line_height: Option<Points>,
pub text_align: Option<TextAlign>,
pub text_align_physical: bool,
pub text_indent: Option<Points>,
pub text_indent_em: Option<f32>,
pub font_family: Option<FontFamily>,
pub italic: Option<bool>,
pub letter_spacing: Option<Points>,
pub letter_spacing_em: Option<f32>,
pub line_height_em: Option<f32>,
pub font_size_em: Option<f32>,
pub line_height_multiple: Option<f32>,
pub decoration: Option<TextDecoration>,
pub decoration_style: Option<DecorationStyle>,
pub decoration_thickness: Option<Points>,
pub underline_offset: Option<Points>,
pub decoration_color: Option<Color>,
pub transform: Option<TextTransform>,
pub shadow_color: Option<Color>,
pub shadow_offset: Option<Point<Points>>,
pub shadow_radius: Option<Points>,
pub font_variant: Option<FontVariant>,
pub writing_direction: Option<bool>,
pub align_vertical: Option<Percentage>,
pub placeholder_color: Option<Color>,
pub selection_color: Option<Color>,
pub caret_color: Option<Color>,
}Expand description
Text properties as written on a node; unset values are inherited from the enclosing text.
Fields§
§color: Option<Color>Foreground color.
font_size: Option<Points>Font size.
font_weight: Option<u16>Font weight, 100..=900.
line_height: Option<Points>Line height.
text_align: Option<TextAlign>Block alignment (only meaningful on a text block).
text_align_physical: boolWhether text_align’s left or right is a side (left, right),
kept right to left, rather than the start or the end (start,
end), which right to left is the other side.
text_indent: Option<Points>How far the first line of each paragraph starts from the leading
edge (textIndent); None inherits. A negative value is 0: the
first line does not hang into the margin.
text_indent_em: Option<f32>The same in ems of this node’s font size ("2em"); overrides
text_indent when set after it.
font_family: Option<FontFamily>Font family; None inherits (the system font at the root).
italic: Option<bool>Italic (fontStyle).
letter_spacing: Option<Points>Extra space between characters.
letter_spacing_em: Option<f32>Extra space between characters in ems of this node’s font size
("0.05em"); overrides letter_spacing when set after it.
line_height_em: Option<f32>A line-height length relative to this node’s font size (em or
a percentage), resolved before inheritance.
font_size_em: Option<f32>The font size relative to the inherited font size ("0.875em",
"87.5%"), resolved before inheritance; overrides font_size.
line_height_multiple: Option<f32>Line height as a multiple of the font size ("1.5"),
inherited as a multiple.
decoration: Option<TextDecoration>Underline / strikethrough.
decoration_style: Option<DecorationStyle>textDecorationStyle.
decoration_thickness: Option<Points>textDecorationThickness.
underline_offset: Option<Points>textUnderlineOffset: below the baseline.
decoration_color: Option<Color>Color of the decoration lines; the text color by default.
transform: Option<TextTransform>Case transform.
shadow_color: Option<Color>The text shadow’s color (textShadow, text-shadow-*: its widest
layer’s).
shadow_offset: Option<Point<Points>>The text shadow’s offset.
shadow_radius: Option<Points>The text shadow’s blur radius.
font_variant: Option<FontVariant>fontVariant.
writing_direction: Option<bool>writingDirection: right to left (Some(true)), left to right, or
from the content (None, auto).
align_vertical: Option<Percentage>textAlignVertical: where text shorter than its box sits, 0% top
(auto, top), 50% center, 100% bottom.
placeholder_color: Option<Color>placeholderColor: an input’s placeholder (not inherited).
selection_color: Option<Color>selectionColor: an input’s or a selectable text’s selection
highlight (not inherited).
caret_color: Option<Color>caretColor: an input’s caret (not inherited).