File tree Expand file tree Collapse file tree 1 file changed +49
-1
lines changed
float-pigment-forest/tests/custom/css_flexbox Expand file tree Collapse file tree 1 file changed +49
-1
lines changed Original file line number Diff line number Diff line change 11use crate :: * ;
22
33#[ test]
4- fn flex_gap ( ) {
4+ fn gap ( ) {
55 assert_xml ! (
66 r#"
77 <div style="display: flex; width: 100px; gap: 10px;">
@@ -11,3 +11,51 @@ fn flex_gap() {
1111 "#
1212 )
1313}
14+
15+ #[ test]
16+ fn column_gap_in_flex_row_box ( ) {
17+ assert_xml ! (
18+ r#"
19+ <div style="display: flex; width: 100px; column-gap: 10px; flex-wrap: wrap;">
20+ <div style="width: 100px; height: 30px; flex-shrink: 0" expect_width="100"></div>
21+ <div style="width: 100px; height: 30px; flex-shrink: 0" expect_width="100" expect_top="40"></div>
22+ </div>
23+ "#
24+ )
25+ }
26+
27+ #[ test]
28+ fn row_gap_in_flex_row_box ( ) {
29+ assert_xml ! (
30+ r#"
31+ <div style="display: flex; width: 100px; row-gap: 10px;">
32+ <div style="height: 10px; flex: 1" expect_width="45"></div>
33+ <div style="height: 10px; flex: 1" expect_width="45" expect_left="55"></div>
34+ </div>
35+ "#
36+ )
37+ }
38+
39+ #[ test]
40+ fn column_gap_in_flex_column_box ( ) {
41+ assert_xml ! (
42+ r#"
43+ <div style="display: flex; flex-direction: column; width: 100px; height: 50px; column-gap: 10px; flex-wrap: wrap; align-content: flex-start">
44+ <div style="width: 30px; height: 30px; flex-shrink: 0" expect_height="30"></div>
45+ <div style="width: 30px; height: 30px; flex-shrink: 0" expect_height="30" expect_left="40"></div>
46+ </div>
47+ "#
48+ )
49+ }
50+
51+ #[ test]
52+ fn row_gap_in_flex_column_box ( ) {
53+ assert_xml ! (
54+ r#"
55+ <div style="display: flex; flex-direction: column; width: 100px; height: 100px; row-gap: 10px;">
56+ <div style="width: 100px; height: 30px;" expect_width="100"></div>
57+ <div style="width: 100px; height: 30px;" expect_width="100" expect_top="40"></div>
58+ </div>
59+ "#
60+ )
61+ }
You can’t perform that action at this time.
0 commit comments