diff options
Diffstat (limited to 'web/src/css.rs')
-rw-r--r-- | web/src/css.rs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/web/src/css.rs b/web/src/css.rs index 21f51f85..07589150 100644 --- a/web/src/css.rs +++ b/web/src/css.rs @@ -1,5 +1,6 @@ //! Style your widgets. -use crate::{bumpalo, Align, Background, Color, Length, Padding}; +use crate::bumpalo; +use crate::{Alignment, Background, Color, Length, Padding}; use std::collections::BTreeMap; @@ -195,12 +196,13 @@ pub fn background(background: Background) -> String { } } -/// Returns the style value for the given [`Align`]. -pub fn align(align: Align) -> &'static str { - match align { - Align::Start => "flex-start", - Align::Center => "center", - Align::End => "flex-end", +/// Returns the style value for the given [`Alignment`]. +pub fn alignment(alignment: Alignment) -> &'static str { + match alignment { + Alignment::Start => "flex-start", + Alignment::Center => "center", + Alignment::End => "flex-end", + Alignment::Fill => "stretch", } } |