Skip to content

Commit 6c47b49

Browse files
committed
Changed the -98px test to -99px (the exact threshold value). Added -99em and -100em tests in order to increase test coverage and to document the current (actually desired) behavior (see #133).
1 parent 4a89295 commit 6c47b49

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

tests/rules/text-indent.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,13 @@
1414
Assert.areEqual("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set direction for that item to ltr.", result.messages[0].message);
1515
},
1616

17-
"-98px text-indent should not result in a warning": function(){
18-
var result = CSSLint.verify(".foo{text-indent: -98px;} ", {"text-indent": 1 });
17+
"-99px text-indent should not result in a warning": function(){
18+
var result = CSSLint.verify(".foo{text-indent: -99px;} ", {"text-indent": 1 });
19+
Assert.areEqual(0, result.messages.length);
20+
},
21+
22+
"-99em text-indent should not result in a warning": function(){
23+
var result = CSSLint.verify(".foo{text-indent: -99em;} ", {"text-indent": 1 });
1924
Assert.areEqual(0, result.messages.length);
2025
},
2126

@@ -26,8 +31,8 @@
2631
Assert.areEqual(0, result.messages.length);
2732
},
2833

29-
"-100px text-indent with RTL should result in a warning": function(){
30-
var result = CSSLint.verify(".foo{text-indent: -100px; direction: rtl; }", {"text-indent": 1 });
34+
"-100em text-indent with RTL should result in a warning": function(){
35+
var result = CSSLint.verify(".foo{text-indent: -100em; direction: rtl; }", {"text-indent": 1 });
3136
Assert.areEqual(1, result.messages.length);
3237
Assert.areEqual("warning", result.messages[0].type);
3338
Assert.areEqual("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set direction for that item to ltr.", result.messages[0].message);

0 commit comments

Comments
 (0)