pub struct ClassProps {
pub number_of_lines: Option<u32>,
pub ellipsize: Option<EllipsizeMode>,
pub no_wrap: Option<bool>,
pub pretty: bool,
pub pointer_events: Option<PointerEvents>,
pub selectable: Option<bool>,
pub placeholder_color: Option<Color>,
pub selection_color: Option<Color>,
pub caret_color: Option<Color>,
pub text_shadows: Option<Vec<TextShadow>>,
pub space: Option<Space>,
}Expand description
Node properties classes and styles set: those that are not layout or
drawing (the core takes them from the style, crate::Style’s
numberOfLines, textOverflow, userSelect and pointerEvents, and from
the classes for the rest).
Fields§
§number_of_lines: Option<u32>numberOfLines (line-clamp-*, truncate); Some(0) removes a clamp.
ellipsize: Option<EllipsizeMode>textOverflow (text-ellipsis, text-clip, truncate).
no_wrap: Option<bool>whitespace-nowrap, text-nowrap, truncate: lines never wrap.
Inherited, as CSS’s white-space: a view’s reaches the texts in it.
pretty: booltext-pretty: lines wrap, and a last line of a word or two takes
words from the lines above. Set with Self::no_wrap.
pointer_events: Option<PointerEvents>pointerEvents (pointer-events-none / -auto).
selectable: Option<bool>userSelect (select-none / select-text; auto: none). A
view’s reach the texts in it that say none, as CSS’s user-select: auto takes its parent’s.
placeholder_color: Option<Color>placeholder:text-* (inputs).
selection_color: Option<Color>selection:bg-*: the highlight of a selection (inputs, selectable
texts).
caret_color: Option<Color>caret-* (inputs).
text_shadows: Option<Vec<TextShadow>>text-shadow-* layers beyond the first (drawn as one shadow).
space: Option<Space>space-x-* / space-y-*: margins the view gives its children.