Skip to content

Commit

Permalink
Merge pull request #2189 from Modernizr/feature/css-grid
Browse files Browse the repository at this point in the history
Add CSS Grid test for old & new syntaxes
  • Loading branch information
KuraFire authored Apr 13, 2017
2 parents afbffbf + 34f4ced commit 6ee39b9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
20 changes: 20 additions & 0 deletions feature-detects/css/cssgrid.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*!
{
"name": "CSS Grid (old & new)",
"property": ["cssgrid", "cssgridlegacy"],
"authors": ["Faruk Ates"],
"tags": ["css"],
"notes": [{
"name": "The new, standardized CSS Grid",
"href": "https://www.w3.org/TR/css3-grid-layout/"
}, {
"name": "The _old_ CSS Grid (legacy)",
"href": "https://www.w3.org/TR/2011/WD-css3-grid-layout-20110407/"
}]
}
!*/
define(['Modernizr', 'testAllProps'], function(Modernizr, testAllProps) {
// `grid-columns` is only in the old syntax, `grid-column` exists in both and so `grid-template-rows` is used for the new syntax.
Modernizr.addTest('cssgridlegacy', testAllProps('grid-columns', '10px', true));
Modernizr.addTest('cssgrid', testAllProps('grid-template-rows', 'none', true));
});
1 change: 1 addition & 0 deletions lib/config-all.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"css/checked",
"css/chunit",
"css/columns",
"css/cssgrid",
"css/cubicbezierrange",
"css/displayrunin",
"css/displaytable",
Expand Down

0 comments on commit 6ee39b9

Please sign in to comment.