Utility

Trait Utility 

Source
pub trait Utility {
Show 25 methods // Required method fn declarations(&self, f: &mut dyn Write) -> Result; // Provided methods fn selector_prefix(&self, _f: &mut dyn Write) -> Result { ... } fn selector_suffix(&self, _f: &mut dyn Write) -> Result { ... } fn suffix(&self, _f: &mut dyn Write) -> Result { ... } fn write_animate_from(&self, _f: &mut dyn Write) -> Result { ... } fn write_animate_to(&self, _f: &mut dyn Write) -> Result { ... } fn hash_modifier(&self, _hasher: &mut dyn Hasher) { ... } fn override_class_name(&self) -> Option<&str> { ... } fn order(&self) -> usize { ... } fn active(self) -> Active<Self> where Self: Sized { ... } fn after(self) -> After<Self> where Self: Sized { ... } fn animate_from(self) -> AnimateFrom<Self> where Self: Sized { ... } fn animate_to(self) -> AnimateTo<Self> where Self: Sized { ... } fn apply_to_children(self) -> ApplyToChildren<Self> where Self: Sized { ... } fn before(self) -> Before<Self> where Self: Sized { ... } fn disabled(self) -> Disabled<Self> where Self: Sized { ... } fn enabled(self) -> Enabled<Self> where Self: Sized { ... } fn focus(self) -> Focus<Self> where Self: Sized { ... } fn focus_visible(self) -> FocusVisible<Self> where Self: Sized { ... } fn focus_within(self) -> FocusWithin<Self> where Self: Sized { ... } fn group_hover(self) -> GroupHover<Self> where Self: Sized { ... } fn hover(self) -> Hover<Self> where Self: Sized { ... } fn visited(self) -> Visited<Self> where Self: Sized { ... } fn min_width_px(self, min_width_px: u32) -> MinWidth<Self> where Self: Sized { ... } fn max_width_px(self, max_width_px: u32) -> MaxWidth<Self> where Self: Sized { ... }
}

Required Methods§

Source

fn declarations(&self, f: &mut dyn Write) -> Result

Provided Methods§

Source

fn selector_prefix(&self, _f: &mut dyn Write) -> Result

Source

fn selector_suffix(&self, _f: &mut dyn Write) -> Result

Source

fn suffix(&self, _f: &mut dyn Write) -> Result

Source

fn write_animate_from(&self, _f: &mut dyn Write) -> Result

Source

fn write_animate_to(&self, _f: &mut dyn Write) -> Result

Source

fn hash_modifier(&self, _hasher: &mut dyn Hasher)

Source

fn override_class_name(&self) -> Option<&str>

Source

fn order(&self) -> usize

The higher the returned number the later the style is positioned in the stylesheet to take precedence.

Source

fn active(self) -> Active<Self>
where Self: Sized,

Apply style only when the element is being pressed (:active).

Source

fn after(self) -> After<Self>
where Self: Sized,

Apply style to ::after pseude element.

Source

fn animate_from(self) -> AnimateFrom<Self>
where Self: Sized,

Source

fn animate_to(self) -> AnimateTo<Self>
where Self: Sized,

Source

fn apply_to_children(self) -> ApplyToChildren<Self>
where Self: Sized,

Apply style to all direct children (> *).

Source

fn before(self) -> Before<Self>
where Self: Sized,

Apply style to ::before pseude element.

Source

fn disabled(self) -> Disabled<Self>
where Self: Sized,

Apply style only when the element is disabled (:disabled).

Source

fn enabled(self) -> Enabled<Self>
where Self: Sized,

Apply style only when the element is not disabled (:enabled).

Source

fn focus(self) -> Focus<Self>
where Self: Sized,

Apply style only when the element has focus (:foucs).

Source

fn focus_visible(self) -> FocusVisible<Self>
where Self: Sized,

Apply style only when the element has been focused using the keyboard (:foucs-visible).

Source

fn focus_within(self) -> FocusWithin<Self>
where Self: Sized,

Apply style only when the element or one of its descendants has focus (:foucs-within).

Source

fn group_hover(self) -> GroupHover<Self>
where Self: Sized,

Source

fn hover(self) -> Hover<Self>
where Self: Sized,

Apply style only when the user hovers over the element (:hover).

Source

fn visited(self) -> Visited<Self>
where Self: Sized,

Apply style only when the link has already been visited (:visited).

Source

fn min_width_px(self, min_width_px: u32) -> MinWidth<Self>
where Self: Sized,

Apply style only when browser width is at least min_width_px. @media (min-width: {min_width_px}px)

Source

fn max_width_px(self, max_width_px: u32) -> MaxWidth<Self>
where Self: Sized,

Apply style only when browser width does not exceed max_width_px. @media (max-width: {max_width_px}px)

Implementors§