/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Generic values for properties related to animations and transitions. use crate::Zero; use crate::derives::*; use crate::typed_om::{KeywordValue, ToTyped, TypedValue}; use crate::values::generics::length::GenericLengthPercentageOrAuto; use crate::values::specified::animation::{ ScrollAxis, ScrollFunction, TimelineName, TimelineRangeName, }; use crate::values::specified::length::EqualsPercentage; use std::fmt::{self, Write}; use style_traits::{CssString, CssWriter, ToCss}; use thin_vec::ThinVec; /// The `animation-duration` property. /// /// https://drafts.csswg.org/css-animations-2/#animation-duration #[derive( Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToShmem, )] #[repr(C, u8)] pub enum GenericAnimationDuration { /// The initial value. However, we serialize this as 0s if the preference is disabled. Auto, /// The time value,