Skip to main content

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