Struct css_style::size::Size [−][src]
pub struct Size {
pub width: Option<Length>,
pub min_width: Option<Length>,
pub max_width: Option<Length>,
pub height: Option<Length>,
pub min_height: Option<Length>,
pub max_height: Option<Length>,
}
Expand description
use css_style::{Style, unit::em};
Style::default()
.and_size(|conf| {
conf.width(em(2.))
.height(em(1.5))
.min_width(em(1.5))
.min_height(em(1.))
.max_width(em(4.))
.max_height(em(3.))
});
Fields
width: Option<Length>
min_width: Option<Length>
max_width: Option<Length>
height: Option<Length>
min_height: Option<Length>
max_height: Option<Length>
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Size
impl UnwindSafe for Size
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: FloatComponent,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: FloatComponent,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
Mutably borrows from an owned value. Read more
Convert into T with values clamped to the color defined bounds Read more
Convert into T. The resulting color might be invalid in its color space Read more
Convert into T, returning ok if the color is inside of its defined
range, otherwise an OutOfBounds
error is returned which contains
the unclamped color. Read more