use crate::foundations::{Packed, ShowSet, Smart, StyleChain, Styles, elem};
use crate::layout::{BlockElem, Em, Ratio};
use crate::visualize::{LineElem, Stroke};
#[elem(ShowSet)]
pub struct DividerElem {}
impl ShowSet for Packed<DividerElem> {
fn show_set(&self, _: StyleChain) -> Styles {
let mut out = Styles::new();
out.set(BlockElem::above, Smart::Custom(Em::new(2.0).into()));
out.set(BlockElem::below, Smart::Custom(Em::new(2.0).into()));
out.set(LineElem::length, Ratio::one().into());
out.set(
LineElem::stroke,
Stroke {
thickness: Smart::Custom(Em::new(0.05).into()),
..Default::default()
},
);
out
}
}