style/values/generics/
effects.rs1#[derive(
9 Animate,
10 Clone,
11 ComputeSquaredDistance,
12 Debug,
13 MallocSizeOf,
14 PartialEq,
15 SpecifiedValueInfo,
16 ToAnimatedValue,
17 ToAnimatedZero,
18 ToCss,
19 ToResolvedValue,
20 ToShmem,
21)]
22#[repr(C)]
23pub struct GenericBoxShadow<Color, SizeLength, BlurShapeLength, ShapeLength> {
24 pub base: GenericSimpleShadow<Color, SizeLength, BlurShapeLength>,
26 pub spread: ShapeLength,
28 #[animation(constant)]
30 #[css(represents_keyword)]
31 pub inset: bool,
32}
33
34pub use self::GenericBoxShadow as BoxShadow;
35
36#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
38#[derive(
39 Clone,
40 ComputeSquaredDistance,
41 Debug,
42 MallocSizeOf,
43 PartialEq,
44 SpecifiedValueInfo,
45 ToAnimatedValue,
46 ToComputedValue,
47 ToCss,
48 ToResolvedValue,
49 ToShmem,
50)]
51#[animation(no_bound(U))]
52#[repr(C, u8)]
53pub enum GenericFilter<Angle, NonNegativeFactor, ZeroToOneFactor, Length, Shadow, U> {
54 #[css(function)]
56 Blur(Length),
57 #[css(function)]
59 Brightness(NonNegativeFactor),
60 #[css(function)]
62 Contrast(NonNegativeFactor),
63 #[css(function)]
65 Grayscale(ZeroToOneFactor),
66 #[css(function)]
68 HueRotate(Angle),
69 #[css(function)]
71 Invert(ZeroToOneFactor),
72 #[css(function)]
74 Opacity(ZeroToOneFactor),
75 #[css(function)]
77 Saturate(NonNegativeFactor),
78 #[css(function)]
80 Sepia(ZeroToOneFactor),
81 #[css(function)]
83 DropShadow(Shadow),
84 #[animation(error)]
86 Url(U),
87}
88
89pub use self::GenericFilter as Filter;
90
91#[derive(
96 Animate,
97 Clone,
98 ComputeSquaredDistance,
99 Debug,
100 MallocSizeOf,
101 PartialEq,
102 SpecifiedValueInfo,
103 ToAnimatedValue,
104 ToAnimatedZero,
105 ToCss,
106 ToResolvedValue,
107 ToShmem,
108)]
109#[repr(C)]
110pub struct GenericSimpleShadow<Color, SizeLength, ShapeLength> {
111 pub color: Color,
113 pub horizontal: SizeLength,
115 pub vertical: SizeLength,
117 pub blur: ShapeLength,
119}
120
121pub use self::GenericSimpleShadow as SimpleShadow;