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§
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>
Sourcefn order(&self) -> usize
fn order(&self) -> usize
The higher the returned number the later the style is positioned in the stylesheet to take precedence.
Sourcefn active(self) -> Active<Self>where
Self: Sized,
fn active(self) -> Active<Self>where
Self: Sized,
Apply style only when the element is being pressed (:active).
fn animate_from(self) -> AnimateFrom<Self>where
Self: Sized,
fn animate_to(self) -> AnimateTo<Self>where
Self: Sized,
Sourcefn apply_to_children(self) -> ApplyToChildren<Self>where
Self: Sized,
fn apply_to_children(self) -> ApplyToChildren<Self>where
Self: Sized,
Apply style to all direct children (> *).
Sourcefn disabled(self) -> Disabled<Self>where
Self: Sized,
fn disabled(self) -> Disabled<Self>where
Self: Sized,
Apply style only when the element is disabled (:disabled).
Sourcefn enabled(self) -> Enabled<Self>where
Self: Sized,
fn enabled(self) -> Enabled<Self>where
Self: Sized,
Apply style only when the element is not disabled (:enabled).
Sourcefn focus(self) -> Focus<Self>where
Self: Sized,
fn focus(self) -> Focus<Self>where
Self: Sized,
Apply style only when the element has focus (:foucs).
Sourcefn focus_visible(self) -> FocusVisible<Self>where
Self: Sized,
fn focus_visible(self) -> FocusVisible<Self>where
Self: Sized,
Apply style only when the element has been focused using the keyboard (:foucs-visible).
Sourcefn focus_within(self) -> FocusWithin<Self>where
Self: Sized,
fn focus_within(self) -> FocusWithin<Self>where
Self: Sized,
Apply style only when the element or one of its descendants has focus (:foucs-within).
fn group_hover(self) -> GroupHover<Self>where
Self: Sized,
Sourcefn hover(self) -> Hover<Self>where
Self: Sized,
fn hover(self) -> Hover<Self>where
Self: Sized,
Apply style only when the user hovers over the element (:hover).
Sourcefn visited(self) -> Visited<Self>where
Self: Sized,
fn visited(self) -> Visited<Self>where
Self: Sized,
Apply style only when the link has already been visited (:visited).
Sourcefn min_width_px(self, min_width_px: u32) -> MinWidth<Self>where
Self: Sized,
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)
Sourcefn max_width_px(self, max_width_px: u32) -> MaxWidth<Self>where
Self: Sized,
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)