Struct css_inline::CSSInliner[][src]

pub struct CSSInliner<'a> { /* fields omitted */ }
Expand description

Customizable CSS inliner.

Implementations

Create a new CSSInliner instance with given options.

Return a default InlineOptions that can fully configure the CSS inliner.

Examples

Get default InlineOptions, then change base url

use url::Url;
use css_inline::CSSInliner;
let url = Url::parse("https://api.example.com")?;
let inliner = CSSInliner::options()
    .base_url(Some(url))
    .build();

Inliner, that will produce “compact” HTML. For example, “style” tags will be removed.

Inline CSS styles from