Skip to main content

style/values/animated/
effects.rs

1/* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
5//! Animated types for CSS values related to effects.
6
7#[cfg(not(feature = "gecko"))]
8use crate::values::Impossible;
9use crate::values::animated::color::Color;
10use crate::values::computed::length::Length;
11#[cfg(feature = "gecko")]
12use crate::values::computed::url::ComputedUrl;
13use crate::values::computed::{Angle, NonNegativeLength, Number};
14use crate::values::generics::effects::Filter as GenericFilter;
15use crate::values::generics::effects::SimpleShadow as GenericSimpleShadow;
16
17/// An animated value for the `drop-shadow()` filter.
18pub type AnimatedSimpleShadow = GenericSimpleShadow<Color, Length, NonNegativeLength>;
19
20/// An animated value for a single `filter`.
21#[cfg(feature = "gecko")]
22pub type AnimatedFilter = GenericFilter<Angle, Number, Length, AnimatedSimpleShadow, ComputedUrl>;
23
24/// An animated value for a single `filter`.
25#[cfg(not(feature = "gecko"))]
26pub type AnimatedFilter = GenericFilter<Angle, Number, Length, AnimatedSimpleShadow, Impossible>;