1use super::*;
2
3#[derive(Clone, Copy, Data, Debug, Default, New, PartialEq)]
5pub struct Style {
6 #[get(type(copy))]
8 pub(crate) layout: LayoutStyle,
9 #[get(type(copy))]
11 pub(crate) paint: PaintStyle,
12 #[get(type(copy))]
14 pub(crate) text: TextStyle,
15}
16
17#[derive(Clone, Copy, Data, Debug, Default, New, PartialEq)]
19pub struct ResponsiveStyle {
20 #[get(type(copy))]
22 pub(crate) base: Style,
23 #[new(skip)]
25 #[get(skip)]
26 pub(crate) compact: Option<Style>,
27 #[new(skip)]
29 #[get(skip)]
30 pub(crate) medium: Option<Style>,
31}
32
33#[repr(transparent)]
35#[derive(Clone, Copy, Debug, Default, PartialEq)]
36pub struct Width(pub Length);
37
38#[repr(transparent)]
40#[derive(Clone, Copy, Debug, Default, PartialEq)]
41pub struct Height(pub Length);
42
43#[repr(transparent)]
45#[derive(Clone, Copy, Debug, Default, PartialEq)]
46pub struct MinWidth(pub Length);
47
48#[repr(transparent)]
50#[derive(Clone, Copy, Debug, Default, PartialEq)]
51pub struct MinHeight(pub Length);
52
53#[repr(transparent)]
55#[derive(Clone, Copy, Debug, Default, PartialEq)]
56pub struct MaxWidth(pub Length);
57
58#[repr(transparent)]
60#[derive(Clone, Copy, Debug, Default, PartialEq)]
61pub struct MaxHeight(pub Length);
62
63#[repr(transparent)]
65#[derive(Clone, Copy, Debug, Default, PartialEq)]
66pub struct FlexBasis(pub Length);
67
68#[repr(transparent)]
70#[derive(Clone, Copy, Debug, Default, PartialEq)]
71pub struct AspectRatio(pub f32);
72
73#[repr(transparent)]
75#[derive(Clone, Copy, Debug, Default, PartialEq)]
76pub struct Padding(pub Edges);
77
78#[repr(transparent)]
80#[derive(Clone, Copy, Debug, Default, PartialEq)]
81pub struct Margin(pub Edges);
82
83#[repr(transparent)]
85#[derive(Clone, Copy, Debug, Default, PartialEq)]
86pub struct Gap(pub f32);
87
88#[repr(transparent)]
90#[derive(Clone, Copy, Debug, Default, PartialEq)]
91pub struct RowGap(pub f32);
92
93#[repr(transparent)]
95#[derive(Clone, Copy, Debug, Default, PartialEq)]
96pub struct ColumnGap(pub f32);
97
98#[repr(transparent)]
100#[derive(Clone, Copy, Debug, Default, PartialEq)]
101pub struct FlexGrow(pub f32);
102
103#[repr(transparent)]
105#[derive(Clone, Copy, Debug, Default, PartialEq)]
106pub struct FlexShrink(pub f32);
107
108#[repr(transparent)]
110#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
111pub struct ZIndex(pub i32);
112
113#[repr(transparent)]
115#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
116pub struct GridColumns(pub u16);
117
118#[derive(Clone, Copy, Debug, Default, PartialEq)]
120pub struct Inset(
121 pub Option<f32>,
122 pub Option<f32>,
123 pub Option<f32>,
124 pub Option<f32>,
125);
126
127#[repr(transparent)]
129#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
130pub struct Background(pub Color);
131
132#[repr(transparent)]
134#[derive(Clone, Copy, Debug, Default, PartialEq)]
135pub struct Radius(pub f32);
136
137#[repr(transparent)]
139#[derive(Clone, Copy, Debug, Default, PartialEq)]
140pub struct FocusRing(pub Border);
141
142#[repr(transparent)]
144#[derive(Clone, Copy, Debug, Default, PartialEq)]
145pub struct Opacity(pub f32);
146
147#[repr(transparent)]
149#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
150pub struct StopScrollPropagation(pub bool);
151
152#[repr(transparent)]
154#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
155pub struct StopEventPropagation(pub bool);
156
157#[repr(transparent)]
159#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
160pub struct TextColor(pub Color);
161
162#[repr(transparent)]
164#[derive(Clone, Copy, Debug, Default, PartialEq)]
165pub struct FontSize(pub f32);
166
167#[repr(transparent)]
169#[derive(Clone, Copy, Debug, Default, PartialEq)]
170pub struct LineHeight(pub f32);
171
172#[repr(transparent)]
174#[derive(Clone, Copy, Debug, Default, PartialEq)]
175pub struct LetterSpacing(pub f32);
176
177#[repr(transparent)]
179#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
180pub struct Italic(pub bool);
181
182#[repr(transparent)]
184#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
185pub struct Underline(pub bool);
186
187#[repr(transparent)]
189#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
190pub struct Strikethrough(pub bool);
191
192#[repr(transparent)]
194#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
195pub struct Selectable(pub bool);
196
197#[repr(transparent)]
199#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
200pub struct SelectionColor(pub Color);