1use super::prelude::*;
7
8#[syntax(" auto | none | scrollbar ")]
14#[derive(
15 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
16)]
17#[declaration_metadata(
18 initial = "auto",
19 inherits,
20 applies_to = Elements,
21 animation_type = Discrete,
22 property_group = Scrollbars,
23 computed_value_type = AsSpecified,
24 canonical_order = "per grammar",
25)]
26#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
27#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
28#[derive(csskit_derives::NodeWithMetadata)]
29pub enum MsOverflowStyleStyleValue {}
30
31#[syntax(
33 " auto | none | [ [ pan-x | pan-left | pan-right ] || [ pan-y | pan-up | pan-down ] || pinch-zoom ] | manipulation "
34)]
35#[derive(
36 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
37)]
38#[declaration_metadata(
39 initial = "auto",
40 applies_to = Elements,
41 animation_type = Discrete,
42 property_group = PointerAnimations,
43 computed_value_type = AsSpecified,
44 canonical_order = "per grammar",
45)]
46#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
47#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
48#[derive(csskit_derives::NodeWithMetadata)]
49pub enum MsTouchActionStyleValue {}
50
51#[syntax(" auto | text | none | all ")]
53#[derive(
54 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
55)]
56#[declaration_metadata(
57 initial = "auto",
58 applies_to = Elements,
59 animation_type = Discrete,
60 property_group = Ui,
61 computed_value_type = AsSpecified,
62 canonical_order = "per grammar",
63)]
64#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
65#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
66#[derive(csskit_derives::NodeWithMetadata)]
67pub enum MsUserSelectStyleValue {}
68
69#[syntax(" auto | none | <percentage [0,∞]> ")]
71#[derive(
72 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
73)]
74#[declaration_metadata(
75 initial = "auto",
76 inherits,
77 applies_to = Elements,
78 animation_type = ByComputedValue,
79 percentages = Unknown,
80 property_group = SizeAdjust,
81 computed_value_type = Unknown,
82 canonical_order = "N/A",
83)]
84#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
85#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
86#[derive(csskit_derives::NodeWithMetadata)]
87pub struct MsTextSizeAdjustStyleValue;
88
89#[syntax(" none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ] ")]
91#[derive(
92 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
93)]
94#[declaration_metadata(
95 initial = "0 1 auto",
96 applies_to = Elements,
97 animation_type = Unknown,
98 property_group = Flexbox,
99 computed_value_type = Unknown,
100 canonical_order = "per grammar",
101)]
102#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
103#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
104#[derive(csskit_derives::NodeWithMetadata)]
105pub struct MsFlexStyleValue;
106
107#[syntax(" <integer> ")]
109#[derive(
110 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
111)]
112#[declaration_metadata(
113 initial = "0",
114 applies_to = Elements,
115 animation_type = ByComputedValue,
116 property_group = Flexbox,
117 computed_value_type = AsSpecified,
118 canonical_order = "per grammar",
119)]
120#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
121#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
122#[derive(csskit_derives::NodeWithMetadata)]
123pub struct MsFlexOrderStyleValue;
124
125#[syntax(" row | row-reverse | column | column-reverse ")]
127#[derive(
128 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
129)]
130#[declaration_metadata(
131 initial = "row",
132 applies_to = Elements,
133 animation_type = Discrete,
134 property_group = Flexbox,
135 computed_value_type = AsSpecified,
136 canonical_order = "per grammar",
137)]
138#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
139#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
140#[derive(csskit_derives::NodeWithMetadata)]
141pub enum MsFlexDirectionStyleValue {}
142
143#[syntax(" nowrap | wrap | wrap-reverse ")]
145#[derive(
146 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
147)]
148#[declaration_metadata(
149 initial = "nowrap",
150 applies_to = Elements,
151 animation_type = Discrete,
152 property_group = Flexbox,
153 computed_value_type = AsSpecified,
154 canonical_order = "per grammar",
155)]
156#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
157#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
158#[derive(csskit_derives::NodeWithMetadata)]
159pub enum MsFlexWrapStyleValue {}
160
161#[syntax(" <'flex-direction'> || <'flex-wrap'> ")]
163#[derive(
164 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
165)]
166#[declaration_metadata(
167 initial = "see individual properties",
168 applies_to = Elements,
169 property_group = Flexbox,
170 computed_value_type = Unknown,
171 canonical_order = "per grammar",
172)]
173#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
174#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
175#[derive(csskit_derives::NodeWithMetadata)]
176pub struct MsFlexFlowStyleValue;
177
178#[syntax(" <number [0,∞]> ")]
180#[derive(
181 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
182)]
183#[declaration_metadata(
184 initial = "0",
185 applies_to = Elements,
186 animation_type = ByComputedValue,
187 property_group = Flexbox,
188 computed_value_type = AsSpecified,
189 canonical_order = "per grammar",
190)]
191#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
192#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
193#[derive(csskit_derives::NodeWithMetadata)]
194pub struct MsFlexPositiveStyleValue;
195
196#[syntax(" <number [0,∞]> ")]
198#[derive(
199 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
200)]
201#[declaration_metadata(
202 initial = "1",
203 applies_to = Elements,
204 animation_type = ByComputedValue,
205 property_group = Flexbox,
206 computed_value_type = AsSpecified,
207 canonical_order = "per grammar",
208)]
209#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
210#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
211#[derive(csskit_derives::NodeWithMetadata)]
212pub struct MsFlexNegativeStyleValue;
213
214#[syntax(" content | <'width'> ")]
216#[derive(
217 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
218)]
219#[declaration_metadata(
220 initial = "auto",
221 applies_to = Elements,
222 animation_type = ByComputedValue,
223 property_group = Flexbox,
224 computed_value_type = Unknown,
225 canonical_order = "per grammar",
226)]
227#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
228#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
229#[derive(csskit_derives::NodeWithMetadata)]
230pub enum MsFlexPreferredSizeStyleValue {}
231
232#[syntax(" start | end | center | justify | distribute ")]
237#[derive(
238 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
239)]
240#[declaration_metadata(
241 initial = "start",
242 applies_to = Elements,
243 animation_type = Discrete,
244 property_group = Flexbox,
245 computed_value_type = AsSpecified,
246 canonical_order = "per grammar",
247)]
248#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
249#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
250#[derive(csskit_derives::NodeWithMetadata)]
251pub enum MsFlexPackStyleValue {}
252
253#[syntax(" start | end | center | stretch | baseline ")]
258#[derive(
259 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
260)]
261#[declaration_metadata(
262 initial = "stretch",
263 applies_to = Elements,
264 animation_type = Discrete,
265 property_group = Flexbox,
266 computed_value_type = AsSpecified,
267 canonical_order = "per grammar",
268)]
269#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
270#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
271#[derive(csskit_derives::NodeWithMetadata)]
272pub enum MsFlexAlignStyleValue {}
273
274#[syntax(" auto | start | end | center | stretch | baseline ")]
279#[derive(
280 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
281)]
282#[declaration_metadata(
283 initial = "auto",
284 applies_to = Elements,
285 animation_type = Discrete,
286 property_group = Flexbox,
287 computed_value_type = AsSpecified,
288 canonical_order = "per grammar",
289)]
290#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
291#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
292#[derive(csskit_derives::NodeWithMetadata)]
293pub enum MsFlexItemAlignStyleValue {}
294
295#[syntax(" start | end | center | justify | distribute | stretch ")]
300#[derive(
301 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
302)]
303#[declaration_metadata(
304 initial = "stretch",
305 applies_to = Elements,
306 animation_type = Discrete,
307 property_group = Flexbox,
308 computed_value_type = AsSpecified,
309 canonical_order = "per grammar",
310)]
311#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
312#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
313#[derive(csskit_derives::NodeWithMetadata)]
314pub enum MsFlexLinePackStyleValue {}
315
316#[syntax(" none | <transform-list> ")]
318#[derive(
319 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
320)]
321#[declaration_metadata(
322 initial = "none",
323 applies_to = Elements,
324 animation_type = Unknown,
325 property_group = Transforms,
326 computed_value_type = AsSpecified,
327 canonical_order = "per grammar",
328)]
329#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
330#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
331#[derive(csskit_derives::NodeWithMetadata)]
332pub struct MsTransformStyleValue<'a>;
333
334#[syntax(" none | <filter-value-list> ")]
341#[derive(
342 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
343)]
344#[declaration_metadata(
345 initial = "none",
346 applies_to = Elements,
347 animation_type = Unknown,
348 property_group = FilterEffects,
349 computed_value_type = AsSpecified,
350 canonical_order = "per grammar",
351)]
352#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
353#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
354#[derive(csskit_derives::NodeWithMetadata)]
355pub struct MsFilterStyleValue<'a>;
356
357#[syntax(" <single-transition># ")]
359#[derive(
360 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
361)]
362#[declaration_metadata(
363 initial = "see individual properties",
364 applies_to = Elements,
365 property_group = Transitions,
366 computed_value_type = Unknown,
367 canonical_order = "per grammar",
368)]
369#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
370#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
371#[derive(csskit_derives::NodeWithMetadata)]
372pub struct MsTransitionStyleValue<'a>;
373
374#[cfg(test)]
375mod tests {
376 use super::*;
377 use crate::CssAtomSet;
378 use css_parse::{assert_parse, assert_parse_error};
379
380 #[test]
381 fn test_ms_overflow_style_parses() {
382 assert_parse!(CssAtomSet::ATOMS, MsOverflowStyleStyleValue, "auto");
383 assert_parse!(CssAtomSet::ATOMS, MsOverflowStyleStyleValue, "none");
384 assert_parse!(CssAtomSet::ATOMS, MsOverflowStyleStyleValue, "scrollbar");
385 }
387
388 #[test]
389 fn test_ms_overflow_style_errors() {
390 assert_parse_error!(CssAtomSet::ATOMS, MsOverflowStyleStyleValue, "invalid");
391 }
392
393 #[test]
394 fn test_ms_touch_action_parses() {
395 assert_parse!(CssAtomSet::ATOMS, MsTouchActionStyleValue, "auto");
396 assert_parse!(CssAtomSet::ATOMS, MsTouchActionStyleValue, "none");
397 assert_parse!(CssAtomSet::ATOMS, MsTouchActionStyleValue, "manipulation");
398 assert_parse!(CssAtomSet::ATOMS, MsTouchActionStyleValue, "pan-y");
399 assert_parse!(CssAtomSet::ATOMS, MsTouchActionStyleValue, "pan-x pan-y");
400 }
401
402 #[test]
403 fn test_ms_touch_action_errors() {
404 assert_parse_error!(CssAtomSet::ATOMS, MsTouchActionStyleValue, "invalid");
405 }
406
407 #[test]
408 fn test_ms_user_select_parses() {
409 assert_parse!(CssAtomSet::ATOMS, MsUserSelectStyleValue, "none");
410 assert_parse!(CssAtomSet::ATOMS, MsUserSelectStyleValue, "auto");
411 assert_parse!(CssAtomSet::ATOMS, MsUserSelectStyleValue, "all");
412 }
413
414 #[test]
415 fn test_ms_user_select_errors() {
416 assert_parse_error!(CssAtomSet::ATOMS, MsUserSelectStyleValue, "invalid");
417 }
418
419 #[test]
420 fn test_ms_text_size_adjust_parses() {
421 assert_parse!(CssAtomSet::ATOMS, MsTextSizeAdjustStyleValue, "auto");
422 assert_parse!(CssAtomSet::ATOMS, MsTextSizeAdjustStyleValue, "none");
423 assert_parse!(CssAtomSet::ATOMS, MsTextSizeAdjustStyleValue, "100%");
424 }
425
426 #[test]
427 fn test_ms_text_size_adjust_errors() {
428 assert_parse_error!(CssAtomSet::ATOMS, MsTextSizeAdjustStyleValue, "invalid");
429 }
430
431 #[test]
432 fn test_ms_flex_parses() {
433 assert_parse!(CssAtomSet::ATOMS, MsFlexStyleValue, "none");
434 assert_parse!(CssAtomSet::ATOMS, MsFlexStyleValue, "1");
435 assert_parse!(CssAtomSet::ATOMS, MsFlexStyleValue, "0 0 auto");
436 assert_parse!(CssAtomSet::ATOMS, MsFlexStyleValue, "0 0 100%");
437 }
438
439 #[test]
440 fn test_ms_flex_errors() {
441 assert_parse_error!(CssAtomSet::ATOMS, MsFlexStyleValue, "invalid");
442 }
443
444 #[test]
445 fn test_ms_flex_order_parses() {
446 assert_parse!(CssAtomSet::ATOMS, MsFlexOrderStyleValue, "0");
447 assert_parse!(CssAtomSet::ATOMS, MsFlexOrderStyleValue, "-1");
448 assert_parse!(CssAtomSet::ATOMS, MsFlexOrderStyleValue, "8");
449 }
450
451 #[test]
452 fn test_ms_flex_direction_parses() {
453 assert_parse!(CssAtomSet::ATOMS, MsFlexDirectionStyleValue, "row");
454 assert_parse!(CssAtomSet::ATOMS, MsFlexDirectionStyleValue, "column");
455 assert_parse!(CssAtomSet::ATOMS, MsFlexDirectionStyleValue, "row-reverse");
456 assert_parse!(CssAtomSet::ATOMS, MsFlexDirectionStyleValue, "column-reverse");
457 }
458
459 #[test]
460 fn test_ms_flex_direction_errors() {
461 assert_parse_error!(CssAtomSet::ATOMS, MsFlexDirectionStyleValue, "invalid");
462 }
463
464 #[test]
465 fn test_ms_flex_wrap_parses() {
466 assert_parse!(CssAtomSet::ATOMS, MsFlexWrapStyleValue, "nowrap");
467 assert_parse!(CssAtomSet::ATOMS, MsFlexWrapStyleValue, "wrap");
468 assert_parse!(CssAtomSet::ATOMS, MsFlexWrapStyleValue, "wrap-reverse");
469 }
470
471 #[test]
472 fn test_ms_flex_wrap_errors() {
473 assert_parse_error!(CssAtomSet::ATOMS, MsFlexWrapStyleValue, "invalid");
474 }
475
476 #[test]
477 fn test_ms_flex_pack_parses() {
478 assert_parse!(CssAtomSet::ATOMS, MsFlexPackStyleValue, "start");
479 assert_parse!(CssAtomSet::ATOMS, MsFlexPackStyleValue, "end");
480 assert_parse!(CssAtomSet::ATOMS, MsFlexPackStyleValue, "center");
481 assert_parse!(CssAtomSet::ATOMS, MsFlexPackStyleValue, "justify");
482 assert_parse!(CssAtomSet::ATOMS, MsFlexPackStyleValue, "distribute");
483 }
484
485 #[test]
486 fn test_ms_flex_pack_errors() {
487 assert_parse_error!(CssAtomSet::ATOMS, MsFlexPackStyleValue, "invalid");
488 }
489
490 #[test]
491 fn test_ms_flex_align_parses() {
492 assert_parse!(CssAtomSet::ATOMS, MsFlexAlignStyleValue, "start");
493 assert_parse!(CssAtomSet::ATOMS, MsFlexAlignStyleValue, "end");
494 assert_parse!(CssAtomSet::ATOMS, MsFlexAlignStyleValue, "center");
495 assert_parse!(CssAtomSet::ATOMS, MsFlexAlignStyleValue, "stretch");
496 assert_parse!(CssAtomSet::ATOMS, MsFlexAlignStyleValue, "baseline");
497 }
498
499 #[test]
500 fn test_ms_flex_align_errors() {
501 assert_parse_error!(CssAtomSet::ATOMS, MsFlexAlignStyleValue, "invalid");
502 }
503
504 #[test]
505 fn test_ms_flex_item_align_parses() {
506 assert_parse!(CssAtomSet::ATOMS, MsFlexItemAlignStyleValue, "auto");
507 assert_parse!(CssAtomSet::ATOMS, MsFlexItemAlignStyleValue, "start");
508 assert_parse!(CssAtomSet::ATOMS, MsFlexItemAlignStyleValue, "end");
509 assert_parse!(CssAtomSet::ATOMS, MsFlexItemAlignStyleValue, "center");
510 assert_parse!(CssAtomSet::ATOMS, MsFlexItemAlignStyleValue, "stretch");
511 assert_parse!(CssAtomSet::ATOMS, MsFlexItemAlignStyleValue, "baseline");
512 }
513
514 #[test]
515 fn test_ms_flex_item_align_errors() {
516 assert_parse_error!(CssAtomSet::ATOMS, MsFlexItemAlignStyleValue, "invalid");
517 }
518
519 #[test]
520 fn test_ms_flex_line_pack_parses() {
521 assert_parse!(CssAtomSet::ATOMS, MsFlexLinePackStyleValue, "start");
522 assert_parse!(CssAtomSet::ATOMS, MsFlexLinePackStyleValue, "end");
523 assert_parse!(CssAtomSet::ATOMS, MsFlexLinePackStyleValue, "center");
524 assert_parse!(CssAtomSet::ATOMS, MsFlexLinePackStyleValue, "justify");
525 assert_parse!(CssAtomSet::ATOMS, MsFlexLinePackStyleValue, "distribute");
526 assert_parse!(CssAtomSet::ATOMS, MsFlexLinePackStyleValue, "stretch");
527 }
528
529 #[test]
530 fn test_ms_flex_line_pack_errors() {
531 assert_parse_error!(CssAtomSet::ATOMS, MsFlexLinePackStyleValue, "invalid");
532 }
533
534 #[test]
535 fn test_ms_transform_parses() {
536 assert_parse!(CssAtomSet::ATOMS, MsTransformStyleValue, "none");
537 assert_parse!(CssAtomSet::ATOMS, MsTransformStyleValue, "rotate(45deg)");
538 assert_parse!(CssAtomSet::ATOMS, MsTransformStyleValue, "scale(-1, 1)");
539 }
540
541 #[test]
542 fn test_ms_transform_errors() {
543 assert_parse_error!(CssAtomSet::ATOMS, MsTransformStyleValue, "invalid");
544 }
545
546 #[test]
547 fn test_ms_filter_parses() {
548 assert_parse!(CssAtomSet::ATOMS, MsFilterStyleValue, "none");
549 assert_parse!(CssAtomSet::ATOMS, MsFilterStyleValue, "blur(4px)");
550 }
551
552 #[test]
553 fn test_ms_filter_errors() {
554 assert_parse_error!(CssAtomSet::ATOMS, MsFilterStyleValue, "invalid");
555 }
556
557 #[test]
558 fn test_ms_transition_parses() {
559 assert_parse!(CssAtomSet::ATOMS, MsTransitionStyleValue, "none");
560 assert_parse!(CssAtomSet::ATOMS, MsTransitionStyleValue, "all 0.3s ease");
561 }
562
563 #[test]
564 fn test_ms_transition_errors() {
565 assert_parse_error!(CssAtomSet::ATOMS, MsTransitionStyleValue, "invalid!!!!");
566 }
567}