pub struct Common {
pub width: Option<f32>,
pub height: Option<f32>,
pub flex: Option<f32>,
pub padding: f32,
pub overflow: Overflow,
pub background: Option<Color>,
pub border: Option<Border>,
pub keep_with_next: bool,
}Expand description
Properties shared by every container/block element: padding, width, height, overflow, background, border, plus
flex (taffy-vocabulary, ADR-004) and keep_with_next (ADR-007 /
Grundprinzip 9). Deliberately no margin on elements (ADR/03: only
padding + Row/Column gap, margin is a Document-level property).
Fields§
§width: Option<f32>§height: Option<f32>§flex: Option<f32>Growth factor along the parent’s main axis; None means “auto”,
i.e. sized from measured content. Only has an effect when the
parent’s main-axis size is bounded (see lightweight-pdf-layout Row/Column).
padding: f32§overflow: Overflow§background: Option<Color>§border: Option<Border>§keep_with_next: boolSee plan/05-overflow-and-robustness.md Grundprinzip 9 / ADR-007:
only placed if the immediately following sibling also still fits.
Trait Implementations§
impl Copy for Common
impl StructuralPartialEq for Common
Auto Trait Implementations§
impl Freeze for Common
impl RefUnwindSafe for Common
impl Send for Common
impl Sync for Common
impl Unpin for Common
impl UnsafeUnpin for Common
impl UnwindSafe for Common
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more