Skip to main content

ClassAttribute

Trait ClassAttribute 

Source
pub trait ClassAttribute<C>
where C: IntoClass,
{ type Output; // Required method fn class(self, value: C) -> Self::Output; }
Expand description

Adds an attribute that modifies the class.

Required Associated Types§

Source

type Output

The type of the element with the new attribute added.

Required Methods§

Source

fn class(self, value: C) -> Self::Output

Adds a CSS class to an element.

Implementors§

Source§

impl<E, At, Ch, C> ClassAttribute<C> for HtmlElement<E, At, Ch>
where E: ElementType + Send, At: Attribute + Send, Ch: RenderHtml + Send, C: IntoClass,

Source§

type Output = <HtmlElement<E, At, Ch> as AddAnyAttr>::Output<Class<C>>