style/values/generics/
effects.rs1use crate::derives::*;
7
8use crate::values::generics::{NonNegative, ZeroToOne};
9
10#[derive(
12 Animate,
13 Clone,
14 ComputeSquaredDistance,
15 Debug,
16 MallocSizeOf,
17 PartialEq,
18 SpecifiedValueInfo,
19 ToAnimatedValue,
20 ToAnimatedZero,
21 ToCss,
22 ToResolvedValue,
23 ToShmem,
24 ToTyped,
25)]
26#[repr(C)]
27#[typed(todo_derive_fields)]
28pub struct GenericBoxShadow<Color, SizeLength, BlurShapeLength, ShapeLength> {
29 pub base: GenericSimpleShadow<Color, SizeLength, BlurShapeLength>,
31 pub spread: ShapeLength,
33 #[animation(constant)]
35 #[css(represents_keyword)]
36 pub inset: bool,
37}
38
39pub use self::GenericBoxShadow as BoxShadow;
40
41#[derive(
43 Clone,
44 ComputeSquaredDistance,
45 Debug,
46 Deserialize,
47 MallocSizeOf,
48 PartialEq,
49 Serialize,
50 SpecifiedValueInfo,
51 ToAnimatedValue,
52 ToComputedValue,
53 ToCss,
54 ToResolvedValue,
55 ToShmem,
56 ToTyped,
57)]
58#[animation(no_bound(U))]
59#[repr(C, u8)]
60#[typed(todo_derive_fields)]
61pub enum GenericFilter<Angle, Factor, Length, Shadow, U> {
62 #[css(function)]
64 Blur(#[animation(field_bound)] NonNegative<Length>),
65 #[css(function)]
67 Brightness(#[animation(field_bound)] NonNegative<Factor>),
68 #[css(function)]
70 Contrast(#[animation(field_bound)] NonNegative<Factor>),
71 #[css(function)]
73 Grayscale(#[animation(field_bound)] ZeroToOne<Factor>),
74 #[css(function)]
76 HueRotate(Angle),
77 #[css(function)]
79 Invert(#[animation(field_bound)] ZeroToOne<Factor>),
80 #[css(function)]
82 Opacity(#[animation(field_bound)] ZeroToOne<Factor>),
83 #[css(function)]
85 Saturate(#[animation(field_bound)] NonNegative<Factor>),
86 #[css(function)]
88 Sepia(#[animation(field_bound)] ZeroToOne<Factor>),
89 #[css(function)]
91 DropShadow(Shadow),
92 #[animation(error)]
94 Url(U),
95}
96
97pub use self::GenericFilter as Filter;
98
99#[derive(
104 Animate,
105 Clone,
106 ComputeSquaredDistance,
107 Debug,
108 MallocSizeOf,
109 PartialEq,
110 SpecifiedValueInfo,
111 ToAnimatedValue,
112 ToAnimatedZero,
113 ToCss,
114 ToResolvedValue,
115 ToShmem,
116 ToTyped,
117)]
118#[repr(C)]
119#[typed(todo_derive_fields)]
120pub struct GenericSimpleShadow<Color, SizeLength, ShapeLength> {
121 pub color: Color,
123 pub horizontal: SizeLength,
125 pub vertical: SizeLength,
127 pub blur: ShapeLength,
129}
130
131pub use self::GenericSimpleShadow as SimpleShadow;