mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Use generics for SimpleShadow
This commit is contained in:
parent
a29261dec1
commit
81a01f6ce1
4 changed files with 23 additions and 45 deletions
|
@ -55,6 +55,23 @@ pub enum Filter<Angle, Factor, Length, DropShadow> {
|
|||
Url(SpecifiedUrl),
|
||||
}
|
||||
|
||||
/// A generic value for the `drop-shadow()` filter and the `text-shadow` property.
|
||||
///
|
||||
/// Contrary to the canonical order from the spec, the color is serialised
|
||||
/// first, like in Gecko and Webkit.
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
#[derive(Clone, Debug, HasViewportPercentage, PartialEq, ToCss)]
|
||||
pub struct SimpleShadow<Color, SizeLength, ShapeLength> {
|
||||
/// Color.
|
||||
pub color: Color,
|
||||
/// Horizontal radius.
|
||||
pub horizontal: SizeLength,
|
||||
/// Vertical radius.
|
||||
pub vertical: SizeLength,
|
||||
/// Blur radius.
|
||||
pub blur: ShapeLength,
|
||||
}
|
||||
|
||||
impl<F> FilterList<F> {
|
||||
/// Returns `none`.
|
||||
#[inline]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue