layout::{LayoutDisplay, LayoutFlexDirection, LayoutPaddingTop, LayoutPaddingBottom, LayoutPaddingLeft, LayoutPaddingRight, LayoutFlexGrow},
style::{StyleBackgroundContent, StyleBackgroundContentVec, StyleBoxShadow, BoxShadowClipMode, LayoutBorderTopWidth, LayoutBorderBottomWidth, LayoutBorderLeftWidth, LayoutBorderRightWidth, StyleBorderTopStyle, BorderStyle, StyleBorderBottomStyle, StyleBorderLeftStyle, StyleBorderRightStyle, StyleBorderTopColor, StyleBorderBottomColor, StyleBorderLeftColor, StyleBorderRightColor, StyleBorderTopLeftRadius, StyleBorderTopRightRadius, StyleBorderBottomLeftRadius, StyleBorderBottomRightRadius},
const CARD_BG_ITEMS: &[StyleBackgroundContent] = &[StyleBackgroundContent::Color(CARD_BG_COLOR)];
Dom::create_div().with_children((0..2000).map(|_| Dom::create_div()).collect::<Vec<_>>().into()),
let mut c = Card::create(Dom::create_text_do_not_use_without_block_level_wrapper("payload")).with_flex_grow(2.5);
let mut c = Card::create(Dom::create_text_do_not_use_without_block_level_wrapper("x")).with_flex_grow(1.0);
let base = Card::create(Dom::create_text_do_not_use_without_block_level_wrapper("old")).with_flex_grow(3.0);
assert_eq!(dom.root.callbacks.as_ref().len(), 1, "the callback was lost on the way into the DOM");
assert_eq!(got.to_bits(), 0_u32, "sub-milli flex_grow {v} did not truncate to +0.0 (got {got})");
assert!(got >= prev, "encoding is not monotonic: {v} encoded to {got}, below the previous {prev}");
assert!(data.downcast_ref::<u64>().is_none(), "a wrong-type downcast reinterpreted the payload");
let dom = Card::create(Dom::create_text_do_not_use_without_block_level_wrapper("inert")).with_flex_grow(1.0).dom();
let mut c = Card::create(Dom::create_text_do_not_use_without_block_level_wrapper("body")).with_flex_grow(2.0);
CssProperty::BorderBottomWidth(v) => border_widths.push(v.get_property().map(|x| px(&x.inner))),
assert_eq!(border_colors, vec![Some(CARD_BORDER_COLOR); 4], "all four border colours must match");
assert_eq!(border_styles, vec![Some(BorderStyle::Solid); 4], "all four border styles must be solid");
assert_eq!(direction, Some(LayoutFlexDirection::Column), "the card must stack its content in a column");
StyleBackgroundContent::Color(c) => assert_eq!(*c, CARD_BG_COLOR, "the card background is not white"),
drop(Card::create(Dom::create_text_do_not_use_without_block_level_wrapper("throwaway")).with_flex_grow(1.0).dom());
assert_eq!(CARD_SHADOW.offset_y.inner.number.get(), 2.0, "the static shadow was mutated or freed");
assert_eq!(shadows, vec![6.0; 4], "a surviving card's shadows were corrupted by other cards' drops");
assert_eq!(props.len(), baseline.len(), "build #{i} produced a different number of properties");
let c = Card::create(Dom::create_text_do_not_use_without_block_level_wrapper("body")).with_flex_grow(1.5);
let inner = Card::create(Dom::create_text_do_not_use_without_block_level_wrapper("inner")).with_flex_grow(1.0).dom();