File tree 2 files changed +74
-1
lines changed 2 files changed +74
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,34 @@ divWidthHeight =
18
18
|-| height 50 px
19
19
20
20
21
+ multiDescendent : Style CssClasses CssIds
22
+ multiDescendent =
23
+ stylesheet
24
+ |%|= [ html, body ]
25
+ |-| boxSizing borderBox
26
+ |-| display none
27
+
28
+ |>%| div
29
+ |-| width 100 pct
30
+ |-| height 100 pct
31
+
32
+ |%|= [ h1, h2 ]
33
+ |-| padding 0 px
34
+ |-| margin 0 px
35
+
36
+ |>%|= [ h3, h4 ]
37
+ |-| width 100 pct
38
+ |-| height 100 pct
39
+
40
+ |%| span
41
+ |-| padding 10 px
42
+ |-| margin 11 px
43
+
44
+ |>%|= [ h2, h1 ]
45
+ |-| width 1 px
46
+ |-| height 2 pct
47
+
48
+
21
49
dreamwriter : Style CssClasses CssIds
22
50
dreamwriter =
23
51
stylesheet
Original file line number Diff line number Diff line change 17
17
suite " elm-stylesheets"
18
18
[ divWidthHeight
19
19
, dreamwriter
20
+ , multiDescendent
20
21
]
21
22
22
23
@@ -75,9 +76,53 @@ body > div {
75
76
background-color: rgb(100, 90, 128);
76
77
color: rgb(40, 35, 76);
77
78
}
78
- """
79
+ """
79
80
in
80
81
suite " Sample stylesheet from Dreamwriter"
81
82
[ test " pretty prints the expected output" <|
82
83
assertEqual output ( prettyPrint input)
83
84
]
85
+
86
+ multiDescendent : Test
87
+ multiDescendent =
88
+ let
89
+ input =
90
+ Fixtures . multiDescendent
91
+
92
+ output =
93
+ String . trim """
94
+ html, body {
95
+ box-sizing: border-box;
96
+ display: none;
97
+ }
98
+
99
+ html, body > div {
100
+ width: 100%;
101
+ height: 100%;
102
+ }
103
+
104
+ h1, h2 {
105
+ padding: 0px;
106
+ margin: 0px;
107
+ }
108
+
109
+ h1, h2 > h3, h1, h2 > h4 {
110
+ width: 100%;
111
+ height: 100%;
112
+ }
113
+
114
+ span {
115
+ padding: 10px;
116
+ margin: 11px;
117
+ }
118
+
119
+ span > h2, span > h1 {
120
+ width: 1px;
121
+ height: 2%;
122
+ }
123
+ """
124
+ in
125
+ suite " Multi-descendent stylesheet"
126
+ [ test " pretty prints the expected output" <|
127
+ assertEqual output ( prettyPrint input)
128
+ ]
You can’t perform that action at this time.
0 commit comments