Struct vertigo::Css

source · []
pub struct Css {
    pub groups: Vec<CssGroup>,
}
Expand description

CSS styles definition for Virtual DOM.

Consists of a vector of css chunks which can be extended.

use vertigo::{Css, CssGroup, html};

let blue_text = Css::str("color: blue");
let black_background = Css::str("background: black");

let my_styles = Css::str("
    font-family: courier;
    font-size: 160%
")
    .extend(blue_text)
    .extend(black_background);

let element = html! { <div css={my_styles} /> };

Fields

groups: Vec<CssGroup>

Implementations

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.