@@ -8,6 +8,7 @@ describe('lost-waffle', function() {
88 check (
99 'a { lost-waffle: 1/3; }' ,
1010 'a { width: calc(99.9% * 1/3 - (30px - 30px * 1/3));' +
11+ ' max-width: calc(99.9% * 1/3 - (30px - 30px * 1/3));\n' +
1112 ' height: calc(99.9% * 1/3 - (30px - 30px * 1/3)); }\n' +
1213 'a:nth-child(1n) { float: left; margin-right: 30px;' +
1314 ' margin-bottom: 30px; clear: none; }\n' +
@@ -22,6 +23,7 @@ describe('lost-waffle', function() {
2223 check (
2324 'a { lost-waffle: 2/4 2; }' ,
2425 'a { width: calc(99.9% * 2/4 - (30px - 30px * 2/4));' +
26+ ' max-width: calc(99.9% * 2/4 - (30px - 30px * 2/4));\n' +
2527 ' height: calc(99.9% * 2/4 - (30px - 30px * 2/4)); }\n' +
2628 'a:nth-child(1n) { float: left; margin-right: 30px;' +
2729 ' margin-bottom: 30px; clear: none; }\n' +
@@ -33,6 +35,7 @@ describe('lost-waffle', function() {
3335 check (
3436 'a { lost-waffle: 2/4; lost-waffle-cycle: 2; }' ,
3537 'a { width: calc(99.9% * 2/4 - (30px - 30px * 2/4));' +
38+ ' max-width: calc(99.9% * 2/4 - (30px - 30px * 2/4));' +
3639 ' height: calc(99.9% * 2/4 - (30px - 30px * 2/4)); }\n' +
3740 'a:nth-child(1n) { float: left; margin-right: 30px;' +
3841 ' margin-bottom: 30px; clear: none; }\n' +
@@ -45,6 +48,7 @@ describe('lost-waffle', function() {
4548 '@lost cycle 0;' +
4649 'a { lost-waffle: 2/4; }' ,
4750 'a { width: calc(99.9% * 2/4 - (30px - 30px * 2/4));' +
51+ ' max-width: calc(99.9% * 2/4 - (30px - 30px * 2/4));' +
4852 ' height: calc(99.9% * 2/4 - (30px - 30px * 2/4)); }' +
4953 'a:nth-child(1n) { float: left; margin-right: 30px;' +
5054 ' margin-bottom: 30px; clear: none; }' +
@@ -53,7 +57,8 @@ describe('lost-waffle', function() {
5357 check (
5458 'a { lost-waffle: 2/4 0 0 flex; }' ,
5559 'a { flex-grow: 0; flex-shrink: 0; flex-basis: calc(99.9% * 2/4);' +
56- 'width: calc(99.9% * 2/4); height: calc(99.9% * 2/4) }' +
60+ 'width: calc(99.9% * 2/4); max-width: calc(99.9% * 2/4); ' +
61+ 'height: calc(99.9% * 2/4)}' +
5762 'a:nth-child(1n) { margin-right: 0; margin-bottom: 0; margin-left:0; }' +
5863 'a:last-child { margin-right: 0; margin-bottom: 0;}'
5964 ) ;
@@ -63,6 +68,7 @@ describe('lost-waffle', function() {
6368 check (
6469 'a { lost-waffle: 3/6 2 60px; }' ,
6570 'a { width: calc(99.9% * 3/6 - (60px - 60px * 3/6));' +
71+ 'max-width: calc(99.9% * 3/6 - (60px - 60px * 3/6));' +
6672 ' height: calc(99.9% * 3/6 - (60px - 60px * 3/6)); }\n' +
6773 'a:nth-child(1n) { float: left; margin-right: 60px;' +
6874 ' margin-bottom: 60px; clear: none; }\n' +
@@ -74,6 +80,7 @@ describe('lost-waffle', function() {
7480 check (
7581 'a { lost-waffle: 3/6 2; lost-waffle-gutter: 60px; }' ,
7682 'a { width: calc(99.9% * 3/6 - (60px - 60px * 3/6));' +
83+ ' max-width: calc(99.9% * 3/6 - (60px - 60px * 3/6));' +
7784 ' height: calc(99.9% * 3/6 - (60px - 60px * 3/6)); }\n' +
7885 'a:nth-child(1n) { float: left; margin-right: 60px;' +
7986 ' margin-bottom: 60px; clear: none; }\n' +
@@ -89,6 +96,7 @@ describe('lost-waffle', function() {
8996 '@lost clearing left; \n' +
9097 'a { lost-waffle: 1/3; }' ,
9198 'a { width: calc(99.9% * 1/3 - (30px - 30px * 1/3));' +
99+ ' max-width: calc(99.9% * 1/3 - (30px - 30px * 1/3));' +
92100 ' height: calc(99.9% * 1/3 - (30px - 30px * 1/3)); }\n' +
93101 'a:nth-child(1n) { float: left; margin-right: 30px;' +
94102 ' margin-bottom: 30px; clear: none; }\n' +
@@ -104,7 +112,8 @@ describe('lost-waffle', function() {
104112 'a { lost-waffle: 2/5 3 0 flex; }' ,
105113 'a { flex-grow: 0; flex-shrink: 0; ' +
106114 'flex-basis: calc(99.9% * 2/5); ' +
107- 'width: calc(99.9% * 2/5); height: calc(99.9% * 2/5); }\n' +
115+ 'width: calc(99.9% * 2/5); max-width: calc(99.9% * 2/5);' +
116+ 'height: calc(99.9% * 2/5); }' +
108117 'a:nth-child(1n) { ' +
109118 'margin-right: 0; margin-bottom: 0; margin-left: 0; }\n' +
110119 'a:last-child { margin-right: 0; margin-bottom: 0; }\n' +
@@ -116,6 +125,7 @@ describe('lost-waffle', function() {
116125 'a { flex-grow: 0; flex-shrink: 0;' +
117126 'flex-basis: calc(99.9% * 2/5 - (30px - 30px * 2/5));' +
118127 'width: calc(99.9% * 2/5 - (30px - 30px * 2/5));' +
128+ 'max-width: calc(99.9% * 2/5 - (30px - 30px * 2/5));' +
119129 'height: calc(99.9% * 2/5 - (30px - 30px * 2/5)) }' +
120130 'a:nth-child(1n) { margin-right: 30px; margin-bottom: 30px; margin-left:0; }' +
121131 'a:last-child{ margin-right: 0; margin-bottom: 0;}' +
@@ -132,7 +142,8 @@ describe('lost-waffle', function() {
132142 check (
133143 'a { lost-waffle: 2/5 3 0 no-flex; }' ,
134144
135- 'a { width: calc(99.9% * 2/5); height: calc(99.9% * 2/5); }\n' +
145+ 'a { width: calc(99.9% * 2/5); max-width: calc(99.9% * 2/5); ' +
146+ 'height: calc(99.9% * 2/5); }' +
136147 'a:nth-child(1n) { float: left; margin-right: 0; margin-bottom: 0; clear: none; }\n' +
137148 'a:last-child { margin-right: 0; margin-bottom: 0; }\n' +
138149 'a:nth-child(3n) { margin-right: 0; }\n' +
@@ -145,7 +156,8 @@ describe('lost-waffle', function() {
145156 check (
146157 'a { lost-waffle: 2/5 3 0 no-flex float-right; }' ,
147158
148- 'a { width: calc(99.9% * 2/5); height: calc(99.9% * 2/5); }\n' +
159+ 'a { width: calc(99.9% * 2/5); max-width: calc(99.9% * 2/5); ' +
160+ 'height: calc(99.9% * 2/5); }' +
149161 'a:nth-child(1n) { float: left; margin-right: 0; margin-bottom: 0; clear: none; }\n' +
150162 'a:last-child { margin-right: 0; margin-bottom: 0; }\n' +
151163 'a:nth-child(3n) { margin-right: 0; float: right; }\n' +
@@ -157,7 +169,8 @@ describe('lost-waffle', function() {
157169 it ( 'Supports custom unit' , function ( ) {
158170 check (
159171 'a { lost-waffle: 2/5 3 0 no-flex float-right; lost-unit: vw; }' ,
160- 'a { width: calc(99.9vw * 2/5); height: calc(99.9vw * 2/5); }\n' +
172+ 'a { width: calc(99.9vw * 2/5); max-width: calc(99.9vw * 2/5);' +
173+ 'height: calc(99.9vw * 2/5); }\n' +
161174 'a:nth-child(1n) { float: left; margin-right: 0; margin-bottom: 0; clear: none; }\n' +
162175 'a:last-child { margin-right: 0; margin-bottom: 0; }\n' +
163176 'a:nth-child(3n) { margin-right: 0; float: right; }\n' +
@@ -175,7 +188,8 @@ describe('lost-waffle', function() {
175188 check (
176189 'a { lost-waffle: 2/5 3 0 no-flex; lost-waffle-rounder: 100; }' ,
177190
178- 'a { width: calc(100% * 2/5); height: calc(100% * 2/5); }\n' +
191+ 'a { width: calc(100% * 2/5); max-width: calc(100% * 2/5);' +
192+ ' height: calc(100% * 2/5); }\n' +
179193 'a:nth-child(1n) { float: left; margin-right: 0; margin-bottom: 0; clear: none; }\n' +
180194 'a:last-child { margin-right: 0; margin-bottom: 0; }\n' +
181195 'a:nth-child(3n) { margin-right: 0; }\n' +
@@ -188,7 +202,7 @@ describe('lost-waffle', function() {
188202 check (
189203 'a { lost-waffle: 2/5 3 0 no-flex; lost-waffle-rounder: 99.99999999999; }' ,
190204
191- 'a { width: calc(99.99999999999% * 2/5); height: calc(99.99999999999% * 2/5); }\n' +
205+ 'a { width: calc(99.99999999999% * 2/5); max-width: calc(99.99999999999% * 2/5); height: calc(99.99999999999% * 2/5); }\n' +
192206 'a:nth-child(1n) { float: left; margin-right: 0; margin-bottom: 0; clear: none; }\n' +
193207 'a:last-child { margin-right: 0; margin-bottom: 0; }\n' +
194208 'a:nth-child(3n) { margin-right: 0; }\n' +
@@ -203,7 +217,8 @@ describe('lost-waffle', function() {
203217 check (
204218 '@lost --beta-direction rtl;\n' +
205219 'div { lost-waffle: 1/3; }' ,
206- 'div { width: calc(99.9% * 1/3 - (30px - 30px * 1/3)); height: calc(99.9% * 1/3 - (30px - 30px * 1/3)); }\n' +
220+ 'div { width: calc(99.9% * 1/3 - (30px - 30px * 1/3));' +
221+ ' max-width: calc(99.9% * 1/3 - (30px - 30px * 1/3)); height: calc(99.9% * 1/3 - (30px - 30px * 1/3)); }\n' +
207222 'div:nth-child(1n) { float: right; margin-left: 30px; margin-bottom: 30px; clear: none; }\n' +
208223 'div:last-child { margin-left: 0; margin-bottom: 0; }\n' +
209224 'div:nth-child(3n) { margin-left: 0; }\n' +
@@ -216,6 +231,7 @@ describe('lost-waffle', function() {
216231 'div { flex-grow: 0; flex-shrink: 0; ' +
217232 'flex-basis: calc(99.9% * 1/3 - (30px - 30px * 1/3));' +
218233 'width: calc(99.9% * 1/3 - (30px - 30px * 1/3));' +
234+ 'max-width: calc(99.9% * 1/3 - (30px - 30px * 1/3));' +
219235 'height: calc(99.9% * 1/3 - (30px - 30px * 1/3)) }' +
220236 'div:nth-child(1n) { margin-left: 30px; margin-bottom: 30px; margin-right: 0; }' +
221237 'div:last-child{ margin-left: 0; margin-bottom: 0; }' +
0 commit comments