so to use the `pwt-flex-fit` class without having to rely on the bare
css class name.
I did not put it in the `Flex` enum, since it does not only change the
flex value, but also the over flow auto.
It's a shorthand for using Flex::Fill + Overflow::Auto, but since we use
that often, this could come in handy
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
format!("pwt-shadow{}", value.0).into()
}
}
+
+/// CSS utility type to use the pwt-flex-fit class
+///
+/// ```
+/// # use pwt::prelude::*;
+/// # use pwt::widget::Container;
+/// use pwt::css::*;
+/// Container::new()
+/// .class(FlexFit)
+/// # ;
+/// ```
+///
+/// This is equivalent to:
+///
+/// ```
+/// # use pwt::prelude::*;
+/// # use pwt::widget::Container;
+/// use pwt::css::*;
+/// Container::new()
+/// .class(Flex::Fill)
+/// .class(Overflow::Auto)
+/// # ;
+/// ```
+///
+pub struct FlexFit;
+impl From<FlexFit> for Classes {
+ fn from(_value: FlexFit) -> Self {
+ "pwt-flex-fit".into()
+ }
+}