css_ast/values/logical/
mod.rs

1#![allow(warnings)]
2//! CSS Logical Properties and Values Level 1
3//! https://drafts.csswg.org/css-logical-1/
4
5mod impls;
6use impls::*;
7
8/// Represents the style value for `block-size` as defined in [css-logical-1](https://drafts.csswg.org/css-logical-1/#block-size).
9///
10/// CSS logical properties control borders, size, margin, and padding with directions and dimensions relative to the writing mode. For example, in a left to right, top to bottom writing mode, block-end refers to the bottom. Also known as flow relative.
11///
12/// The grammar is defined as:
13///
14/// ```text,ignore
15/// <'width'>
16/// ```
17///
18// https://drafts.csswg.org/css-logical-1/#block-size
19#[syntax(" <'width'> ")]
20#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
21#[style_value(
22	initial = "auto",
23	applies_to = "Same as height and width",
24	inherited = "no",
25	percentages = "as for the corresponding physical property",
26	canonical_order = "per grammar",
27	animation_type = "by computed value type"
28)]
29#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
30#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.block-size"))]
31#[visit]
32pub struct BlockSizeStyleValue;
33
34/// Represents the style value for `inline-size` as defined in [css-logical-1](https://drafts.csswg.org/css-logical-1/#inline-size).
35///
36/// CSS logical properties control borders, size, margin, and padding with directions and dimensions relative to the writing mode. For example, in a left to right, top to bottom writing mode, block-end refers to the bottom. Also known as flow relative.
37///
38/// The grammar is defined as:
39///
40/// ```text,ignore
41/// <'width'>
42/// ```
43///
44// https://drafts.csswg.org/css-logical-1/#inline-size
45#[syntax(" <'width'> ")]
46#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
47#[style_value(
48	initial = "auto",
49	applies_to = "Same as height and width",
50	inherited = "no",
51	percentages = "as for the corresponding physical property",
52	canonical_order = "per grammar",
53	animation_type = "by computed value type"
54)]
55#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
56#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.inline-size"))]
57#[visit]
58pub struct InlineSizeStyleValue;
59
60/// Represents the style value for `min-block-size` as defined in [css-logical-1](https://drafts.csswg.org/css-logical-1/#min-block-size).
61///
62/// CSS logical properties control borders, size, margin, and padding with directions and dimensions relative to the writing mode. For example, in a left to right, top to bottom writing mode, block-end refers to the bottom. Also known as flow relative.
63///
64/// The grammar is defined as:
65///
66/// ```text,ignore
67/// <'min-width'>
68/// ```
69///
70// https://drafts.csswg.org/css-logical-1/#min-block-size
71#[syntax(" <'min-width'> ")]
72#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
73#[style_value(
74	initial = "0",
75	applies_to = "same as height and width",
76	inherited = "no",
77	percentages = "as for the corresponding physical property",
78	canonical_order = "per grammar",
79	animation_type = "by computed value type"
80)]
81#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
82#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.min-block-size"))]
83#[visit]
84pub struct MinBlockSizeStyleValue;
85
86/// Represents the style value for `min-inline-size` as defined in [css-logical-1](https://drafts.csswg.org/css-logical-1/#min-inline-size).
87///
88/// CSS logical properties control borders, size, margin, and padding with directions and dimensions relative to the writing mode. For example, in a left to right, top to bottom writing mode, block-end refers to the bottom. Also known as flow relative.
89///
90/// The grammar is defined as:
91///
92/// ```text,ignore
93/// <'min-width'>
94/// ```
95///
96// https://drafts.csswg.org/css-logical-1/#min-inline-size
97#[syntax(" <'min-width'> ")]
98#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
99#[style_value(
100	initial = "0",
101	applies_to = "same as height and width",
102	inherited = "no",
103	percentages = "as for the corresponding physical property",
104	canonical_order = "per grammar",
105	animation_type = "by computed value type"
106)]
107#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
108#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.min-inline-size"))]
109#[visit]
110pub struct MinInlineSizeStyleValue;
111
112/// Represents the style value for `max-block-size` as defined in [css-logical-1](https://drafts.csswg.org/css-logical-1/#max-block-size).
113///
114/// CSS logical properties control borders, size, margin, and padding with directions and dimensions relative to the writing mode. For example, in a left to right, top to bottom writing mode, block-end refers to the bottom. Also known as flow relative.
115///
116/// The grammar is defined as:
117///
118/// ```text,ignore
119/// <'max-width'>
120/// ```
121///
122// https://drafts.csswg.org/css-logical-1/#max-block-size
123#[syntax(" <'max-width'> ")]
124#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
125#[style_value(
126	initial = "none",
127	applies_to = "same as height and width",
128	inherited = "no",
129	percentages = "as for the corresponding physical property",
130	canonical_order = "per grammar",
131	animation_type = "by computed value type"
132)]
133#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
134#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.max-block-size"))]
135#[visit]
136pub struct MaxBlockSizeStyleValue;
137
138/// Represents the style value for `max-inline-size` as defined in [css-logical-1](https://drafts.csswg.org/css-logical-1/#max-inline-size).
139///
140/// CSS logical properties control borders, size, margin, and padding with directions and dimensions relative to the writing mode. For example, in a left to right, top to bottom writing mode, block-end refers to the bottom. Also known as flow relative.
141///
142/// The grammar is defined as:
143///
144/// ```text,ignore
145/// <'max-width'>
146/// ```
147///
148// https://drafts.csswg.org/css-logical-1/#max-inline-size
149#[syntax(" <'max-width'> ")]
150#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
151#[style_value(
152	initial = "none",
153	applies_to = "same as height and width",
154	inherited = "no",
155	percentages = "as for the corresponding physical property",
156	canonical_order = "per grammar",
157	animation_type = "by computed value type"
158)]
159#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
160#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.max-inline-size"))]
161#[visit]
162pub struct MaxInlineSizeStyleValue;
163
164/// Represents the style value for `margin-block-start` as defined in [css-logical-1](https://drafts.csswg.org/css-logical-1/#margin-block-start).
165///
166/// CSS logical properties control borders, size, margin, and padding with directions and dimensions relative to the writing mode. For example, in a left to right, top to bottom writing mode, block-end refers to the bottom. Also known as flow relative.
167///
168/// The grammar is defined as:
169///
170/// ```text,ignore
171/// <'margin-top'>
172/// ```
173///
174// https://drafts.csswg.org/css-logical-1/#margin-block-start
175#[syntax(" <'margin-top'> ")]
176#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
177#[style_value(
178	initial = "0",
179	applies_to = "Same as margin-top",
180	inherited = "no",
181	percentages = "as for the corresponding physical property",
182	canonical_order = "per grammar",
183	animation_type = "by computed value type"
184)]
185#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
186#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.margin-block-start"))]
187#[visit]
188pub struct MarginBlockStartStyleValue;
189
190/// Represents the style value for `margin-block-end` as defined in [css-logical-1](https://drafts.csswg.org/css-logical-1/#margin-block-end).
191///
192/// CSS logical properties control borders, size, margin, and padding with directions and dimensions relative to the writing mode. For example, in a left to right, top to bottom writing mode, block-end refers to the bottom. Also known as flow relative.
193///
194/// The grammar is defined as:
195///
196/// ```text,ignore
197/// <'margin-top'>
198/// ```
199///
200// https://drafts.csswg.org/css-logical-1/#margin-block-end
201#[syntax(" <'margin-top'> ")]
202#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
203#[style_value(
204	initial = "0",
205	applies_to = "Same as margin-top",
206	inherited = "no",
207	percentages = "as for the corresponding physical property",
208	canonical_order = "per grammar",
209	animation_type = "by computed value type"
210)]
211#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
212#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.margin-block-end"))]
213#[visit]
214pub struct MarginBlockEndStyleValue;
215
216/// Represents the style value for `margin-inline-start` as defined in [css-logical-1](https://drafts.csswg.org/css-logical-1/#margin-inline-start).
217///
218/// CSS logical properties control borders, size, margin, and padding with directions and dimensions relative to the writing mode. For example, in a left to right, top to bottom writing mode, block-end refers to the bottom. Also known as flow relative.
219///
220/// The grammar is defined as:
221///
222/// ```text,ignore
223/// <'margin-top'>
224/// ```
225///
226// https://drafts.csswg.org/css-logical-1/#margin-inline-start
227#[syntax(" <'margin-top'> ")]
228#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
229#[style_value(
230	initial = "0",
231	applies_to = "Same as margin-top",
232	inherited = "no",
233	percentages = "as for the corresponding physical property",
234	canonical_order = "per grammar",
235	animation_type = "by computed value type"
236)]
237#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
238#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.margin-inline-start"))]
239#[visit]
240pub struct MarginInlineStartStyleValue;
241
242/// Represents the style value for `margin-inline-end` as defined in [css-logical-1](https://drafts.csswg.org/css-logical-1/#margin-inline-end).
243///
244/// CSS logical properties control borders, size, margin, and padding with directions and dimensions relative to the writing mode. For example, in a left to right, top to bottom writing mode, block-end refers to the bottom. Also known as flow relative.
245///
246/// The grammar is defined as:
247///
248/// ```text,ignore
249/// <'margin-top'>
250/// ```
251///
252// https://drafts.csswg.org/css-logical-1/#margin-inline-end
253#[syntax(" <'margin-top'> ")]
254#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
255#[style_value(
256	initial = "0",
257	applies_to = "Same as margin-top",
258	inherited = "no",
259	percentages = "as for the corresponding physical property",
260	canonical_order = "per grammar",
261	animation_type = "by computed value type"
262)]
263#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
264#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.margin-inline-end"))]
265#[visit]
266pub struct MarginInlineEndStyleValue;
267
268/// Represents the style value for `margin-block` as defined in [css-logical-1](https://drafts.csswg.org/css-logical-1/#margin-block).
269///
270/// CSS logical properties control borders, size, margin, and padding with directions and dimensions relative to the writing mode. For example, in a left to right, top to bottom writing mode, block-end refers to the bottom. Also known as flow relative.
271///
272/// The grammar is defined as:
273///
274/// ```text,ignore
275/// <'margin-top'>{1,2}
276/// ```
277///
278// https://drafts.csswg.org/css-logical-1/#margin-block
279#[syntax(" <'margin-top'>{1,2} ")]
280#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
281#[style_value(
282	initial = "see individual properties",
283	applies_to = "see individual properties",
284	inherited = "see individual properties",
285	percentages = "see individual properties",
286	canonical_order = "per grammar",
287	animation_type = "see individual properties"
288)]
289#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
290#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.margin-block"))]
291#[visit]
292pub struct MarginBlockStyleValue;
293
294/// Represents the style value for `margin-inline` as defined in [css-logical-1](https://drafts.csswg.org/css-logical-1/#margin-inline).
295///
296/// CSS logical properties control borders, size, margin, and padding with directions and dimensions relative to the writing mode. For example, in a left to right, top to bottom writing mode, block-end refers to the bottom. Also known as flow relative.
297///
298/// The grammar is defined as:
299///
300/// ```text,ignore
301/// <'margin-top'>{1,2}
302/// ```
303///
304// https://drafts.csswg.org/css-logical-1/#margin-inline
305#[syntax(" <'margin-top'>{1,2} ")]
306#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
307#[style_value(
308	initial = "see individual properties",
309	applies_to = "see individual properties",
310	inherited = "see individual properties",
311	percentages = "see individual properties",
312	canonical_order = "per grammar",
313	animation_type = "see individual properties"
314)]
315#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
316#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.margin-inline"))]
317#[visit]
318pub struct MarginInlineStyleValue;
319
320/// Represents the style value for `padding-block-start` as defined in [css-logical-1](https://drafts.csswg.org/css-logical-1/#padding-block-start).
321///
322/// CSS logical properties control borders, size, margin, and padding with directions and dimensions relative to the writing mode. For example, in a left to right, top to bottom writing mode, block-end refers to the bottom. Also known as flow relative.
323///
324/// The grammar is defined as:
325///
326/// ```text,ignore
327/// <'padding-top'>
328/// ```
329///
330// https://drafts.csswg.org/css-logical-1/#padding-block-start
331#[syntax(" <'padding-top'> ")]
332#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
333#[style_value(
334	initial = "0",
335	applies_to = "Same as padding-top",
336	inherited = "no",
337	percentages = "as for the corresponding physical property",
338	canonical_order = "per grammar",
339	animation_type = "by computed value type"
340)]
341#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
342#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.padding-block-start"))]
343#[visit]
344pub struct PaddingBlockStartStyleValue;
345
346/// Represents the style value for `padding-block-end` as defined in [css-logical-1](https://drafts.csswg.org/css-logical-1/#padding-block-end).
347///
348/// CSS logical properties control borders, size, margin, and padding with directions and dimensions relative to the writing mode. For example, in a left to right, top to bottom writing mode, block-end refers to the bottom. Also known as flow relative.
349///
350/// The grammar is defined as:
351///
352/// ```text,ignore
353/// <'padding-top'>
354/// ```
355///
356// https://drafts.csswg.org/css-logical-1/#padding-block-end
357#[syntax(" <'padding-top'> ")]
358#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
359#[style_value(
360	initial = "0",
361	applies_to = "Same as padding-top",
362	inherited = "no",
363	percentages = "as for the corresponding physical property",
364	canonical_order = "per grammar",
365	animation_type = "by computed value type"
366)]
367#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
368#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.padding-block-end"))]
369#[visit]
370pub struct PaddingBlockEndStyleValue;
371
372/// Represents the style value for `padding-inline-start` as defined in [css-logical-1](https://drafts.csswg.org/css-logical-1/#padding-inline-start).
373///
374/// CSS logical properties control borders, size, margin, and padding with directions and dimensions relative to the writing mode. For example, in a left to right, top to bottom writing mode, block-end refers to the bottom. Also known as flow relative.
375///
376/// The grammar is defined as:
377///
378/// ```text,ignore
379/// <'padding-top'>
380/// ```
381///
382// https://drafts.csswg.org/css-logical-1/#padding-inline-start
383#[syntax(" <'padding-top'> ")]
384#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
385#[style_value(
386	initial = "0",
387	applies_to = "Same as padding-top",
388	inherited = "no",
389	percentages = "as for the corresponding physical property",
390	canonical_order = "per grammar",
391	animation_type = "by computed value type"
392)]
393#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
394#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.padding-inline-start"))]
395#[visit]
396pub struct PaddingInlineStartStyleValue;
397
398/// Represents the style value for `padding-inline-end` as defined in [css-logical-1](https://drafts.csswg.org/css-logical-1/#padding-inline-end).
399///
400/// CSS logical properties control borders, size, margin, and padding with directions and dimensions relative to the writing mode. For example, in a left to right, top to bottom writing mode, block-end refers to the bottom. Also known as flow relative.
401///
402/// The grammar is defined as:
403///
404/// ```text,ignore
405/// <'padding-top'>
406/// ```
407///
408// https://drafts.csswg.org/css-logical-1/#padding-inline-end
409#[syntax(" <'padding-top'> ")]
410#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
411#[style_value(
412	initial = "0",
413	applies_to = "Same as padding-top",
414	inherited = "no",
415	percentages = "as for the corresponding physical property",
416	canonical_order = "per grammar",
417	animation_type = "by computed value type"
418)]
419#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
420#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.padding-inline-end"))]
421#[visit]
422pub struct PaddingInlineEndStyleValue;
423
424/// Represents the style value for `padding-block` as defined in [css-logical-1](https://drafts.csswg.org/css-logical-1/#padding-block).
425///
426/// CSS logical properties control borders, size, margin, and padding with directions and dimensions relative to the writing mode. For example, in a left to right, top to bottom writing mode, block-end refers to the bottom. Also known as flow relative.
427///
428/// The grammar is defined as:
429///
430/// ```text,ignore
431/// <'padding-top'>{1,2}
432/// ```
433///
434// https://drafts.csswg.org/css-logical-1/#padding-block
435#[syntax(" <'padding-top'>{1,2} ")]
436#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
437#[style_value(
438	initial = "see individual properties",
439	applies_to = "see individual properties",
440	inherited = "see individual properties",
441	percentages = "see individual properties",
442	canonical_order = "per grammar",
443	animation_type = "see individual properties"
444)]
445#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
446#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.padding-block"))]
447#[visit]
448pub struct PaddingBlockStyleValue;
449
450/// Represents the style value for `padding-inline` as defined in [css-logical-1](https://drafts.csswg.org/css-logical-1/#padding-inline).
451///
452/// CSS logical properties control borders, size, margin, and padding with directions and dimensions relative to the writing mode. For example, in a left to right, top to bottom writing mode, block-end refers to the bottom. Also known as flow relative.
453///
454/// The grammar is defined as:
455///
456/// ```text,ignore
457/// <'padding-top'>{1,2}
458/// ```
459///
460// https://drafts.csswg.org/css-logical-1/#padding-inline
461#[syntax(" <'padding-top'>{1,2} ")]
462#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
463#[style_value(
464	initial = "see individual properties",
465	applies_to = "see individual properties",
466	inherited = "see individual properties",
467	percentages = "see individual properties",
468	canonical_order = "per grammar",
469	animation_type = "see individual properties"
470)]
471#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
472#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.padding-inline"))]
473#[visit]
474pub struct PaddingInlineStyleValue;