css_ast/values/scroll_snap/
mod.rs

1#![allow(warnings)]
2//! CSS Scroll Snap Module Level 2
3//! https://drafts.csswg.org/css-scroll-snap-2/
4
5mod impls;
6use impls::*;
7
8// /// Represents the style value for `scroll-snap-type` as defined in [css-scroll-snap-2](https://drafts.csswg.org/css-scroll-snap-2/#scroll-snap-type).
9// ///
10// /// CSS scroll snap controls the panning and scrolling behavior within a scroll container.
11// ///
12// /// The grammar is defined as:
13// ///
14// /// ```text,ignore
15// /// none | [ x | y | block | inline | both ] [ mandatory | proximity ]?
16// /// ```
17// ///
18// // https://drafts.csswg.org/css-scroll-snap-2/#scroll-snap-type
19// #[syntax(" none | [ x | y | block | inline | both ] [ mandatory | proximity ]? ")]
20// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
21// #[style_value(
22// 	initial = "none",
23//   applies_to = "all elements",
24// 	inherited = "no",
25// 	percentages = "n/a",
26// 	canonical_order = "per grammar",
27// 	animation_type = "discrete",
28// )]
29// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
30// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.scroll-snap-type"))]
31// #[visit]
32// pub enum ScrollSnapTypeStyleValue {}
33
34/// Represents the style value for `scroll-padding` as defined in [css-scroll-snap-2](https://drafts.csswg.org/css-scroll-snap-2/#scroll-padding).
35///
36/// CSS scroll snap controls the panning and scrolling behavior within a scroll container.
37///
38/// The grammar is defined as:
39///
40/// ```text,ignore
41/// [ auto | <length-percentage [0,∞]> ]{1,4}
42/// ```
43///
44// https://drafts.csswg.org/css-scroll-snap-2/#scroll-padding
45#[syntax(" [ auto | <length-percentage [0,∞]> ]{1,4} ")]
46#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
47#[style_value(
48	initial = "auto",
49	applies_to = "scroll containers",
50	inherited = "no",
51	percentages = "relative to the corresponding dimension of the scroll container’s scrollport",
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.scroll-padding"))]
57#[visit]
58pub struct ScrollPaddingStyleValue;
59
60/// Represents the style value for `scroll-margin` as defined in [css-scroll-snap-2](https://drafts.csswg.org/css-scroll-snap-2/#scroll-margin).
61///
62/// CSS scroll snap controls the panning and scrolling behavior within a scroll container.
63///
64/// The grammar is defined as:
65///
66/// ```text,ignore
67/// <length>{1,4}
68/// ```
69///
70// https://drafts.csswg.org/css-scroll-snap-2/#scroll-margin
71#[syntax(" <length>{1,4} ")]
72#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
73#[style_value(
74	initial = "0",
75	applies_to = "all elements",
76	inherited = "no",
77	percentages = "n/a",
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.scroll-margin"))]
83#[visit]
84pub struct ScrollMarginStyleValue;
85
86/// Represents the style value for `scroll-snap-align` as defined in [css-scroll-snap-2](https://drafts.csswg.org/css-scroll-snap-2/#scroll-snap-align).
87///
88/// CSS scroll snap controls the panning and scrolling behavior within a scroll container.
89///
90/// The grammar is defined as:
91///
92/// ```text,ignore
93/// [ none | start | end | center ]{1,2}
94/// ```
95///
96// https://drafts.csswg.org/css-scroll-snap-2/#scroll-snap-align
97#[syntax(" [ none | start | end | center ]{1,2} ")]
98#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
99#[style_value(
100	initial = "none",
101	applies_to = "all elements",
102	inherited = "no",
103	percentages = "n/a",
104	canonical_order = "per grammar",
105	animation_type = "discrete"
106)]
107#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
108#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.scroll-snap-align"))]
109#[visit]
110pub struct ScrollSnapAlignStyleValue;
111
112/// Represents the style value for `scroll-snap-stop` as defined in [css-scroll-snap-2](https://drafts.csswg.org/css-scroll-snap-2/#scroll-snap-stop).
113///
114/// CSS scroll snap controls the panning and scrolling behavior within a scroll container.
115///
116/// The grammar is defined as:
117///
118/// ```text,ignore
119/// normal | always
120/// ```
121///
122// https://drafts.csswg.org/css-scroll-snap-2/#scroll-snap-stop
123#[syntax(" normal | always ")]
124#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
125#[style_value(
126	initial = "normal",
127	applies_to = "all elements",
128	inherited = "no",
129	percentages = "n/a",
130	canonical_order = "per grammar",
131	animation_type = "discrete"
132)]
133#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
134#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.scroll-snap-stop"))]
135#[visit]
136pub enum ScrollSnapStopStyleValue {}
137
138/// Represents the style value for `scroll-padding-top` as defined in [css-scroll-snap-2](https://drafts.csswg.org/css-scroll-snap-2/#scroll-padding-top).
139///
140/// CSS scroll snap controls the panning and scrolling behavior within a scroll container.
141///
142/// The grammar is defined as:
143///
144/// ```text,ignore
145/// auto | <length-percentage [0,∞]>
146/// ```
147///
148// https://drafts.csswg.org/css-scroll-snap-2/#scroll-padding-top
149#[syntax(" auto | <length-percentage [0,∞]> ")]
150#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
151#[style_value(
152	initial = "auto",
153	applies_to = "scroll containers",
154	inherited = "no",
155	percentages = "relative to the scroll container’s scrollport",
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.scroll-padding-top"))]
161#[visit]
162pub struct ScrollPaddingTopStyleValue;
163
164/// Represents the style value for `scroll-padding-right` as defined in [css-scroll-snap-2](https://drafts.csswg.org/css-scroll-snap-2/#scroll-padding-right).
165///
166/// CSS scroll snap controls the panning and scrolling behavior within a scroll container.
167///
168/// The grammar is defined as:
169///
170/// ```text,ignore
171/// auto | <length-percentage [0,∞]>
172/// ```
173///
174// https://drafts.csswg.org/css-scroll-snap-2/#scroll-padding-right
175#[syntax(" auto | <length-percentage [0,∞]> ")]
176#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
177#[style_value(
178	initial = "auto",
179	applies_to = "scroll containers",
180	inherited = "no",
181	percentages = "relative to the scroll container’s scrollport",
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.scroll-padding-right"))]
187#[visit]
188pub struct ScrollPaddingRightStyleValue;
189
190/// Represents the style value for `scroll-padding-bottom` as defined in [css-scroll-snap-2](https://drafts.csswg.org/css-scroll-snap-2/#scroll-padding-bottom).
191///
192/// CSS scroll snap controls the panning and scrolling behavior within a scroll container.
193///
194/// The grammar is defined as:
195///
196/// ```text,ignore
197/// auto | <length-percentage [0,∞]>
198/// ```
199///
200// https://drafts.csswg.org/css-scroll-snap-2/#scroll-padding-bottom
201#[syntax(" auto | <length-percentage [0,∞]> ")]
202#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
203#[style_value(
204	initial = "auto",
205	applies_to = "scroll containers",
206	inherited = "no",
207	percentages = "relative to the scroll container’s scrollport",
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.scroll-padding-bottom"))]
213#[visit]
214pub struct ScrollPaddingBottomStyleValue;
215
216/// Represents the style value for `scroll-padding-left` as defined in [css-scroll-snap-2](https://drafts.csswg.org/css-scroll-snap-2/#scroll-padding-left).
217///
218/// CSS scroll snap controls the panning and scrolling behavior within a scroll container.
219///
220/// The grammar is defined as:
221///
222/// ```text,ignore
223/// auto | <length-percentage [0,∞]>
224/// ```
225///
226// https://drafts.csswg.org/css-scroll-snap-2/#scroll-padding-left
227#[syntax(" auto | <length-percentage [0,∞]> ")]
228#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
229#[style_value(
230	initial = "auto",
231	applies_to = "scroll containers",
232	inherited = "no",
233	percentages = "relative to the scroll container’s scrollport",
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.scroll-padding-left"))]
239#[visit]
240pub struct ScrollPaddingLeftStyleValue;
241
242/// Represents the style value for `scroll-padding-inline-start` as defined in [css-scroll-snap-2](https://drafts.csswg.org/css-scroll-snap-2/#scroll-padding-inline-start).
243///
244/// CSS scroll snap controls the panning and scrolling behavior within a scroll container.
245///
246/// The grammar is defined as:
247///
248/// ```text,ignore
249/// auto | <length-percentage [0,∞]>
250/// ```
251///
252// https://drafts.csswg.org/css-scroll-snap-2/#scroll-padding-inline-start
253#[syntax(" auto | <length-percentage [0,∞]> ")]
254#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
255#[style_value(
256	initial = "auto",
257	applies_to = "scroll containers",
258	inherited = "no",
259	percentages = "relative to the scroll container’s scrollport",
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(
265	feature = "css_feature_data",
266	derive(ToCSSFeature),
267	css_feature("css.properties.scroll-padding-inline-start")
268)]
269#[visit]
270pub struct ScrollPaddingInlineStartStyleValue;
271
272/// Represents the style value for `scroll-padding-block-start` as defined in [css-scroll-snap-2](https://drafts.csswg.org/css-scroll-snap-2/#scroll-padding-block-start).
273///
274/// CSS scroll snap controls the panning and scrolling behavior within a scroll container.
275///
276/// The grammar is defined as:
277///
278/// ```text,ignore
279/// auto | <length-percentage [0,∞]>
280/// ```
281///
282// https://drafts.csswg.org/css-scroll-snap-2/#scroll-padding-block-start
283#[syntax(" auto | <length-percentage [0,∞]> ")]
284#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
285#[style_value(
286	initial = "auto",
287	applies_to = "scroll containers",
288	inherited = "no",
289	percentages = "relative to the scroll container’s scrollport",
290	canonical_order = "per grammar",
291	animation_type = "by computed value type"
292)]
293#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
294#[cfg_attr(
295	feature = "css_feature_data",
296	derive(ToCSSFeature),
297	css_feature("css.properties.scroll-padding-block-start")
298)]
299#[visit]
300pub struct ScrollPaddingBlockStartStyleValue;
301
302/// Represents the style value for `scroll-padding-inline-end` as defined in [css-scroll-snap-2](https://drafts.csswg.org/css-scroll-snap-2/#scroll-padding-inline-end).
303///
304/// CSS scroll snap controls the panning and scrolling behavior within a scroll container.
305///
306/// The grammar is defined as:
307///
308/// ```text,ignore
309/// auto | <length-percentage [0,∞]>
310/// ```
311///
312// https://drafts.csswg.org/css-scroll-snap-2/#scroll-padding-inline-end
313#[syntax(" auto | <length-percentage [0,∞]> ")]
314#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
315#[style_value(
316	initial = "auto",
317	applies_to = "scroll containers",
318	inherited = "no",
319	percentages = "relative to the scroll container’s scrollport",
320	canonical_order = "per grammar",
321	animation_type = "by computed value type"
322)]
323#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
324#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.scroll-padding-inline-end"))]
325#[visit]
326pub struct ScrollPaddingInlineEndStyleValue;
327
328/// Represents the style value for `scroll-padding-block-end` as defined in [css-scroll-snap-2](https://drafts.csswg.org/css-scroll-snap-2/#scroll-padding-block-end).
329///
330/// CSS scroll snap controls the panning and scrolling behavior within a scroll container.
331///
332/// The grammar is defined as:
333///
334/// ```text,ignore
335/// auto | <length-percentage [0,∞]>
336/// ```
337///
338// https://drafts.csswg.org/css-scroll-snap-2/#scroll-padding-block-end
339#[syntax(" auto | <length-percentage [0,∞]> ")]
340#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
341#[style_value(
342	initial = "auto",
343	applies_to = "scroll containers",
344	inherited = "no",
345	percentages = "relative to the scroll container’s scrollport",
346	canonical_order = "per grammar",
347	animation_type = "by computed value type"
348)]
349#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
350#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.scroll-padding-block-end"))]
351#[visit]
352pub struct ScrollPaddingBlockEndStyleValue;
353
354/// Represents the style value for `scroll-padding-block` as defined in [css-scroll-snap-2](https://drafts.csswg.org/css-scroll-snap-2/#scroll-padding-block).
355///
356/// CSS scroll snap controls the panning and scrolling behavior within a scroll container.
357///
358/// The grammar is defined as:
359///
360/// ```text,ignore
361/// [ auto | <length-percentage [0,∞]> ]{1,2}
362/// ```
363///
364// https://drafts.csswg.org/css-scroll-snap-2/#scroll-padding-block
365#[syntax(" [ auto | <length-percentage [0,∞]> ]{1,2} ")]
366#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
367#[style_value(
368	initial = "auto",
369	applies_to = "scroll containers",
370	inherited = "no",
371	percentages = "relative to the scroll container’s scrollport",
372	canonical_order = "per grammar",
373	animation_type = "by computed value"
374)]
375#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
376#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.scroll-padding-block"))]
377#[visit]
378pub struct ScrollPaddingBlockStyleValue;
379
380/// Represents the style value for `scroll-padding-inline` as defined in [css-scroll-snap-2](https://drafts.csswg.org/css-scroll-snap-2/#scroll-padding-inline).
381///
382/// CSS scroll snap controls the panning and scrolling behavior within a scroll container.
383///
384/// The grammar is defined as:
385///
386/// ```text,ignore
387/// [ auto | <length-percentage [0,∞]> ]{1,2}
388/// ```
389///
390// https://drafts.csswg.org/css-scroll-snap-2/#scroll-padding-inline
391#[syntax(" [ auto | <length-percentage [0,∞]> ]{1,2} ")]
392#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
393#[style_value(
394	initial = "auto",
395	applies_to = "scroll containers",
396	inherited = "no",
397	percentages = "relative to the scroll container’s scrollport",
398	canonical_order = "per grammar",
399	animation_type = "by computed value"
400)]
401#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
402#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.scroll-padding-inline"))]
403#[visit]
404pub struct ScrollPaddingInlineStyleValue;
405
406/// Represents the style value for `scroll-margin-top` as defined in [css-scroll-snap-2](https://drafts.csswg.org/css-scroll-snap-2/#scroll-margin-top).
407///
408/// CSS scroll snap controls the panning and scrolling behavior within a scroll container.
409///
410/// The grammar is defined as:
411///
412/// ```text,ignore
413/// <length>
414/// ```
415///
416// https://drafts.csswg.org/css-scroll-snap-2/#scroll-margin-top
417#[syntax(" <length> ")]
418#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
419#[style_value(
420	initial = "0",
421	applies_to = "all elements",
422	inherited = "no",
423	percentages = "n/a",
424	canonical_order = "per grammar",
425	animation_type = "by computed value type"
426)]
427#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
428#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.scroll-margin-top"))]
429#[visit]
430pub struct ScrollMarginTopStyleValue;
431
432/// Represents the style value for `scroll-margin-right` as defined in [css-scroll-snap-2](https://drafts.csswg.org/css-scroll-snap-2/#scroll-margin-right).
433///
434/// CSS scroll snap controls the panning and scrolling behavior within a scroll container.
435///
436/// The grammar is defined as:
437///
438/// ```text,ignore
439/// <length>
440/// ```
441///
442// https://drafts.csswg.org/css-scroll-snap-2/#scroll-margin-right
443#[syntax(" <length> ")]
444#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
445#[style_value(
446	initial = "0",
447	applies_to = "all elements",
448	inherited = "no",
449	percentages = "n/a",
450	canonical_order = "per grammar",
451	animation_type = "by computed value type"
452)]
453#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
454#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.scroll-margin-right"))]
455#[visit]
456pub struct ScrollMarginRightStyleValue;
457
458/// Represents the style value for `scroll-margin-bottom` as defined in [css-scroll-snap-2](https://drafts.csswg.org/css-scroll-snap-2/#scroll-margin-bottom).
459///
460/// CSS scroll snap controls the panning and scrolling behavior within a scroll container.
461///
462/// The grammar is defined as:
463///
464/// ```text,ignore
465/// <length>
466/// ```
467///
468// https://drafts.csswg.org/css-scroll-snap-2/#scroll-margin-bottom
469#[syntax(" <length> ")]
470#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
471#[style_value(
472	initial = "0",
473	applies_to = "all elements",
474	inherited = "no",
475	percentages = "n/a",
476	canonical_order = "per grammar",
477	animation_type = "by computed value type"
478)]
479#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
480#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.scroll-margin-bottom"))]
481#[visit]
482pub struct ScrollMarginBottomStyleValue;
483
484/// Represents the style value for `scroll-margin-left` as defined in [css-scroll-snap-2](https://drafts.csswg.org/css-scroll-snap-2/#scroll-margin-left).
485///
486/// CSS scroll snap controls the panning and scrolling behavior within a scroll container.
487///
488/// The grammar is defined as:
489///
490/// ```text,ignore
491/// <length>
492/// ```
493///
494// https://drafts.csswg.org/css-scroll-snap-2/#scroll-margin-left
495#[syntax(" <length> ")]
496#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
497#[style_value(
498	initial = "0",
499	applies_to = "all elements",
500	inherited = "no",
501	percentages = "n/a",
502	canonical_order = "per grammar",
503	animation_type = "by computed value type"
504)]
505#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
506#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.scroll-margin-left"))]
507#[visit]
508pub struct ScrollMarginLeftStyleValue;
509
510/// Represents the style value for `scroll-margin-block-start` as defined in [css-scroll-snap-2](https://drafts.csswg.org/css-scroll-snap-2/#scroll-margin-block-start).
511///
512/// CSS scroll snap controls the panning and scrolling behavior within a scroll container.
513///
514/// The grammar is defined as:
515///
516/// ```text,ignore
517/// <length>
518/// ```
519///
520// https://drafts.csswg.org/css-scroll-snap-2/#scroll-margin-block-start
521#[syntax(" <length> ")]
522#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
523#[style_value(
524	initial = "0",
525	applies_to = "all elements",
526	inherited = "no",
527	percentages = "n/a",
528	canonical_order = "per grammar",
529	animation_type = "by computed value type"
530)]
531#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
532#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.scroll-margin-block-start"))]
533#[visit]
534pub struct ScrollMarginBlockStartStyleValue;
535
536/// Represents the style value for `scroll-margin-inline-start` as defined in [css-scroll-snap-2](https://drafts.csswg.org/css-scroll-snap-2/#scroll-margin-inline-start).
537///
538/// CSS scroll snap controls the panning and scrolling behavior within a scroll container.
539///
540/// The grammar is defined as:
541///
542/// ```text,ignore
543/// <length>
544/// ```
545///
546// https://drafts.csswg.org/css-scroll-snap-2/#scroll-margin-inline-start
547#[syntax(" <length> ")]
548#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
549#[style_value(
550	initial = "0",
551	applies_to = "all elements",
552	inherited = "no",
553	percentages = "n/a",
554	canonical_order = "per grammar",
555	animation_type = "by computed value type"
556)]
557#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
558#[cfg_attr(
559	feature = "css_feature_data",
560	derive(ToCSSFeature),
561	css_feature("css.properties.scroll-margin-inline-start")
562)]
563#[visit]
564pub struct ScrollMarginInlineStartStyleValue;
565
566/// Represents the style value for `scroll-margin-block-end` as defined in [css-scroll-snap-2](https://drafts.csswg.org/css-scroll-snap-2/#scroll-margin-block-end).
567///
568/// CSS scroll snap controls the panning and scrolling behavior within a scroll container.
569///
570/// The grammar is defined as:
571///
572/// ```text,ignore
573/// <length>
574/// ```
575///
576// https://drafts.csswg.org/css-scroll-snap-2/#scroll-margin-block-end
577#[syntax(" <length> ")]
578#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
579#[style_value(
580	initial = "0",
581	applies_to = "all elements",
582	inherited = "no",
583	percentages = "n/a",
584	canonical_order = "per grammar",
585	animation_type = "by computed value type"
586)]
587#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
588#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.scroll-margin-block-end"))]
589#[visit]
590pub struct ScrollMarginBlockEndStyleValue;
591
592/// Represents the style value for `scroll-margin-inline-end` as defined in [css-scroll-snap-2](https://drafts.csswg.org/css-scroll-snap-2/#scroll-margin-inline-end).
593///
594/// CSS scroll snap controls the panning and scrolling behavior within a scroll container.
595///
596/// The grammar is defined as:
597///
598/// ```text,ignore
599/// <length>
600/// ```
601///
602// https://drafts.csswg.org/css-scroll-snap-2/#scroll-margin-inline-end
603#[syntax(" <length> ")]
604#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
605#[style_value(
606	initial = "0",
607	applies_to = "all elements",
608	inherited = "no",
609	percentages = "n/a",
610	canonical_order = "per grammar",
611	animation_type = "by computed value type"
612)]
613#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
614#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.scroll-margin-inline-end"))]
615#[visit]
616pub struct ScrollMarginInlineEndStyleValue;
617
618/// Represents the style value for `scroll-margin-block` as defined in [css-scroll-snap-2](https://drafts.csswg.org/css-scroll-snap-2/#scroll-margin-block).
619///
620/// CSS scroll snap controls the panning and scrolling behavior within a scroll container.
621///
622/// The grammar is defined as:
623///
624/// ```text,ignore
625/// <length>{1,2}
626/// ```
627///
628// https://drafts.csswg.org/css-scroll-snap-2/#scroll-margin-block
629#[syntax(" <length>{1,2} ")]
630#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
631#[style_value(
632	initial = "0",
633	applies_to = "all elements",
634	inherited = "no",
635	percentages = "n/a",
636	canonical_order = "per grammar",
637	animation_type = "by computed value type"
638)]
639#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
640#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.scroll-margin-block"))]
641#[visit]
642pub struct ScrollMarginBlockStyleValue;
643
644/// Represents the style value for `scroll-margin-inline` as defined in [css-scroll-snap-2](https://drafts.csswg.org/css-scroll-snap-2/#scroll-margin-inline).
645///
646/// CSS scroll snap controls the panning and scrolling behavior within a scroll container.
647///
648/// The grammar is defined as:
649///
650/// ```text,ignore
651/// <length>{1,2}
652/// ```
653///
654// https://drafts.csswg.org/css-scroll-snap-2/#scroll-margin-inline
655#[syntax(" <length>{1,2} ")]
656#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
657#[style_value(
658	initial = "0",
659	applies_to = "all elements",
660	inherited = "no",
661	percentages = "n/a",
662	canonical_order = "per grammar",
663	animation_type = "by computed value type"
664)]
665#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
666#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.scroll-margin-inline"))]
667#[visit]
668pub struct ScrollMarginInlineStyleValue;
669
670/// Represents the style value for `scroll-initial-target` as defined in [css-scroll-snap-2](https://drafts.csswg.org/css-scroll-snap-2/#scroll-initial-target).
671///
672/// The scroll-initial-target: nearest CSS declaration sets the initial scroll position of its scroll container to the top of the element, much like scrolling to a URL fragment.
673///
674/// The grammar is defined as:
675///
676/// ```text,ignore
677/// none | nearest
678/// ```
679///
680// https://drafts.csswg.org/css-scroll-snap-2/#scroll-initial-target
681#[syntax(" none | nearest ")]
682#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
683#[style_value(
684	initial = "none",
685	applies_to = "all elements",
686	inherited = "no",
687	percentages = "n/a",
688	canonical_order = "per grammar",
689	animation_type = "none"
690)]
691#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
692#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.scroll-initial-target"))]
693#[visit]
694pub enum ScrollInitialTargetStyleValue {}