|
239 | 239 | Assert.areEqual("float can't be used with display: inline.", result.messages[0].message); |
240 | 240 | }, |
241 | 241 |
|
| 242 | + "Float:none with inline-block should not result in a warning": function(){ |
| 243 | + var result = CSSLint.verify(".foo { float: none; display: inline-block; }", { "display-property-grouping": 1 }); |
| 244 | + Assert.areEqual(0, result.messages.length); |
| 245 | + }, |
| 246 | + |
| 247 | + "Float:none with inline should result not in a warning": function(){ |
| 248 | + var result = CSSLint.verify(".foo { float: none; display: inline; }", { "display-property-grouping": 1 }); |
| 249 | + Assert.areEqual(0, result.messages.length); |
| 250 | + }, |
| 251 | + |
242 | 252 | "Height with inline should result in a warning": function(){ |
243 | 253 | var result = CSSLint.verify(".foo { height: 100px; display: inline; }", { "display-property-grouping": 1 }); |
244 | 254 | Assert.areEqual(1, result.messages.length); |
|
412 | 422 | Assert.areEqual(1, result.messages.length); |
413 | 423 | Assert.areEqual("warning", result.messages[0].type); |
414 | 424 | Assert.areEqual("float can't be used with display: table-cell.", result.messages[0].message); |
415 | | - } |
| 425 | + }, |
| 426 | + |
| 427 | + "Float:none with table-row should not result in a warning": function(){ |
| 428 | + var result = CSSLint.verify(".foo { float: none; display: table-row; }", { "display-property-grouping": 1 }); |
| 429 | + Assert.areEqual(0, result.messages.length); |
| 430 | + }, |
| 431 | + |
| 432 | + "Float:none with table-cell should not result in a warning": function(){ |
| 433 | + var result = CSSLint.verify(".foo { float: none; display: table-cell; }", { "display-property-grouping": 1 }); |
| 434 | + Assert.areEqual(0, result.messages.length); |
| 435 | + } |
416 | 436 |
|
417 | 437 | })); |
418 | 438 |
|
|
481 | 501 | Assert.areEqual(1, result.messages.length); |
482 | 502 | Assert.areEqual("warning", result.messages[0].type); |
483 | 503 | Assert.areEqual("Too many floats (11), abstraction needed.", result.messages[0].message); |
| 504 | + }, |
| 505 | + |
| 506 | + "float: none should not count and therefore should not result in a warning": function(){ |
| 507 | + var result = CSSLint.verify(".foo { float: none; } .foo { float: left; } .foo { float: left; } .foo { float: left; } .foo { float: left; } .foo { float: left; } .foo { float: left; } .foo { float: left; } .foo { float: left; } .foo { float: left; }", { "floats": 1 }); |
| 508 | + Assert.areEqual(0, result.messages.length); |
484 | 509 | } |
485 | 510 | })); |
486 | 511 |
|
|
0 commit comments