Struct css_style::background::Background [−][src]
pub struct Background {
pub color: Option<Color>,
pub image: Option<Image>,
pub repeat: Option<Repeat>,
pub attachment: Option<Attachment>,
pub position: Option<Position>,
pub clip: Option<Clip>,
pub origin: Option<Origin>,
pub size: Option<Size>,
}
Expand description
use css_style::{Style, Color, color, unit::em};
Style::default()
.and_background(|conf| {
conf.image("/bg/fullpage.png")
.color(color::named::WHITE)
.scroll()
});
Fields
color: Option<Color>
image: Option<Image>
repeat: Option<Repeat>
attachment: Option<Attachment>
position: Option<Position>
clip: Option<Clip>
origin: Option<Origin>
size: Option<Size>
Implementations
Trait Implementations
Returns the “default value” for a type. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for Background
impl Send for Background
impl Sync for Background
impl Unpin for Background
impl UnwindSafe for Background
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