-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding a few more testdata points. Fixing path stuff from last change.
- Loading branch information
Showing
5 changed files
with
55 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,31 @@ | ||
define(['Modernizr', 'testStyles'], function( Modernizr, testStyles ) { | ||
// display: table and table-cell test. (both are tested under one name "table-cell" ) | ||
// By @scottjehl | ||
/*! | ||
{ | ||
"name": "CSS Display table", | ||
"property": "display-table", | ||
"caniuse": "css-table", | ||
"authors": ["scottjehl"], | ||
"tags": ["css"], | ||
"notes": [{ | ||
"name": "All additional table display values", | ||
"href": "http://pastebin.com/Gk9PeVaQ" | ||
}] | ||
} | ||
!*//* DOC | ||
`display: table` and `table-cell` test. (both are tested under one name `table-cell` ) | ||
// all additional table display values are here: http://pastebin.com/Gk9PeVaQ though Scott | ||
// has seen some IE false positives with that sort of weak detection. | ||
// more testing neccessary perhaps. | ||
All additional table display values are here: http://pastebin.com/Gk9PeVaQ though Scott | ||
has seen some IE false positives with that sort of weak detection. | ||
More testing neccessary perhaps. | ||
*/ | ||
define(['Modernizr', 'testStyles'], function( Modernizr, testStyles ) { | ||
// If a document is in rtl mode this test will fail so we force ltr mode on the injeced | ||
// element https://github.com/Modernizr/Modernizr/issues/716 | ||
testStyles('#modernizr{display: table; direction: ltr}#modernizr div{display: table-cell; padding: 10px}', function( elem ) { | ||
var ret; | ||
var child = elem.children; | ||
ret = child[0].offsetLeft < child[1].offsetLeft; | ||
Modernizr.addTest('display-table', ret); | ||
},2); | ||
}, 2); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters