polished_css/property/scroll/
snap.rs1crate::create_property!(
2 ScrollSnapAlign,
3 display = "",
4 atomic = "scroll-s-a",
5 custom = false,
6 data_type = "",
7 initial_value = None,
8 keywords = "none,start,center,end",
9);
10
11crate::create_property!(
12 ScrollSnapStop,
13 display = "",
14 atomic = "scroll-s-s",
15 custom = false,
16 data_type = "",
17 initial_value = Normal,
18 keywords = "normal,always",
19);
20
21crate::create_property!(
22 ScrollSnapType,
23 display = "",
24 atomic = "scroll-s-t",
25 custom = false,
26 data_type = "",
27 initial_value = None,
28 keywords =
29 "none,x,y,block,inline,both mandatory,x mandatory,y mandatory,x proximity,y proximity",
30);
31
32#[cfg(test)]
33mod test {
34 #[test]
35 fn scroll_snap_align() {
36 let name = "scroll-snap-align";
37 crate::test_property_initial_value!(ScrollSnapAlign, None);
38 crate::test_global_keywords!(ScrollSnapAlign, name);
39 crate::test_function_var!(ScrollSnapAlign, name);
40 #[cfg(feature = "atomic")]
41 crate::test_atomic_property!(ScrollSnapAlign, "scroll-s-a");
42 }
43
44 #[test]
45 fn scroll_snap_stop() {
46 let name = "scroll-snap-stop";
47 crate::test_property_initial_value!(ScrollSnapStop, Normal);
48 crate::test_global_keywords!(ScrollSnapStop, name);
49 crate::test_function_var!(ScrollSnapStop, name);
50 #[cfg(feature = "atomic")]
51 crate::test_atomic_property!(ScrollSnapStop, "scroll-s-s");
52 }
53
54 #[test]
55 fn scroll_snap_type() {
56 let name = "scroll-snap-type";
57 crate::test_property_initial_value!(ScrollSnapType, None);
58 crate::test_global_keywords!(ScrollSnapType, name);
59 #[cfg(feature = "atomic")]
60 crate::test_atomic_property!(ScrollSnapType, "scroll-s-t");
61 }
62}