style/values/computed/
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//! Computed types for CSS values related to effects.
6
7use crate::values::computed::color::Color;
8use crate::values::computed::length::{Length, NonNegativeLength};
9#[cfg(feature = "gecko")]
10use crate::values::computed::url::ComputedUrl;
11use crate::values::computed::{Angle, Number};
12use crate::values::generics::effects::BoxShadow as GenericBoxShadow;
13use crate::values::generics::effects::Filter as GenericFilter;
14use crate::values::generics::effects::SimpleShadow as GenericSimpleShadow;
15#[cfg(not(feature = "gecko"))]
16use crate::values::Impossible;
17
18/// A computed value for a single shadow of the `box-shadow` property.
19pub type BoxShadow = GenericBoxShadow<Color, Length, NonNegativeLength, Length>;
20
21/// A computed value for a single `filter`.
22#[cfg(feature = "gecko")]
23pub type Filter = GenericFilter<Angle, Number, Length, SimpleShadow, ComputedUrl>;
24
25/// A computed value for a single `filter`.
26#[cfg(feature = "servo")]
27pub type Filter = GenericFilter<Angle, Number, Length, SimpleShadow, Impossible>;
28
29/// A computed value for the `drop-shadow()` filter.
30pub type SimpleShadow = GenericSimpleShadow<Color, Length, NonNegativeLength>;