generate_wrapper

Function generate_wrapper 

Source
pub fn generate_wrapper<T: FnOnce(&mut ContextHandle<'_, '_, '_, '_, '_>)>(
    context: &mut ContextHandle<'_, '_, '_, '_, '_>,
    rule_content_fn: T,
)
Expand description

Generate the complete CSS wrapper needed for a single rule.

This function is a combination of the generate_at_rules and generate_class functions.

The second argument, a closure, is called to generate the CSS content of the rule.

ยงErrors

Returns fmt::Error indicating whether writing to the buffer succeeded.