Skip to main content

StyleAttribute

Trait StyleAttribute 

Source
pub trait StyleAttribute<S>
where S: IntoStyle,
{ type Output; // Required method fn style(self, value: S) -> Self::Output; }
Expand description

Adds an attribute that modifies the CSS styles.

Required Associated Types§

Source

type Output

The type of the element with the new attribute added.

Required Methods§

Source

fn style(self, value: S) -> Self::Output

Adds a CSS style to an element.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<E, At, Ch, S> StyleAttribute<S> for HtmlElement<E, At, Ch>
where E: ElementType + Send, At: Attribute + Send, Ch: RenderHtml + Send, S: IntoStyle,

Source§

type Output = <HtmlElement<E, At, Ch> as AddAnyAttr>::Output<Style<S>>