pub enum TransitionProperty {
Opacity,
BackgroundColor,
TextColor,
BorderColor,
}Expand description
Property identifier for a TransitionSpec.
The v1 animatable set is colors + opacity - geometry-free visual
properties only. Layout properties (width, height, padding, …)
are deliberately not transitionable: animating them would re-run
layout every frame; the CSS parser warns and drops them.
Variants§
Opacity
CSS opacity; driven by step_opacity_transitions against the Opacity component.
BackgroundColor
CSS background-color; driven by step_background_transitions
against the solid Visuals::fill. Also parameterises the
hover / press tint tweens in crate::hover (duration + easing).
TextColor
CSS color / text-color; driven by
step_text_color_transitions against TextStyle::color.
BorderColor
CSS border-color; driven by step_border_color_transitions
against Visuals::border.color.
Implementations§
Source§impl TransitionProperty
impl TransitionProperty
Sourcepub fn from_css(name: &str) -> Option<Self>
pub fn from_css(name: &str) -> Option<Self>
Parse a CSS property name into a recognised TransitionProperty.
Unknown names return None; callers should warn and ignore.
Trait Implementations§
Source§impl Clone for TransitionProperty
impl Clone for TransitionProperty
Source§fn clone(&self) -> TransitionProperty
fn clone(&self) -> TransitionProperty
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TransitionProperty
impl Debug for TransitionProperty
Source§impl Hash for TransitionProperty
impl Hash for TransitionProperty
Source§impl PartialEq for TransitionProperty
impl PartialEq for TransitionProperty
Source§fn eq(&self, other: &TransitionProperty) -> bool
fn eq(&self, other: &TransitionProperty) -> bool
self and other values to be equal, and is used by ==.impl Copy for TransitionProperty
impl Eq for TransitionProperty
impl StructuralPartialEq for TransitionProperty
Auto Trait Implementations§
impl Freeze for TransitionProperty
impl RefUnwindSafe for TransitionProperty
impl Send for TransitionProperty
impl Sync for TransitionProperty
impl Unpin for TransitionProperty
impl UnsafeUnpin for TransitionProperty
impl UnwindSafe for TransitionProperty
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> DynEq for T
impl<T> DynEq for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.