Skip to content

Commit

Permalink
Some flexbox love
Browse files Browse the repository at this point in the history
  • Loading branch information
SlexAxton committed Feb 25, 2013
1 parent 218b0ec commit 85bfe05
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 4 deletions.
14 changes: 12 additions & 2 deletions feature-detects/css/flexbox.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
/*!
{
"name": "Flexbox",
"property": "flexbox",
"caniuse": "flexbox",
"tags": ["css"],
"notes": [{
"name": "The _new_ flexbox",
"href": "http://dev.w3.org/csswg/css3-flexbox"
}]
}
!*/
define(['Modernizr', 'testAllProps'], function( Modernizr, testAllProps ) {
// The *new* flexbox
// dev.w3.org/csswg/css3-flexbox
Modernizr.addTest('flexbox', testAllProps('flexWrap'));
});
14 changes: 12 additions & 2 deletions feature-detects/css/flexboxlegacy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
/*!
{
"name": "Flexbox (legacy)",
"property": "flexboxlegacy",
"tags": ["css"],
"polyfills": ["flexie"],
"notes": [{
"name": "The _old_ flexbox",
"href": "http://www.w3.org/TR/2009/WD-css3-flexbox-20090723/"
}]
}
!*/
define(['Modernizr', 'testAllProps'], function( Modernizr, testAllProps ) {
// The *old* flexbox
// www.w3.org/TR/2009/WD-css3-flexbox-20090723/
Modernizr.addTest('flexboxlegacy', testAllProps('boxDirection'));
});
7 changes: 7 additions & 0 deletions lib/polyfills.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,12 @@
"href": "https://github.com/Schepp/CSS-Filters-Polyfill",
"licenses": ["MIT"],
"notes": ["CSS filter effects for Chrome 20+, Safari 6+, Firefox 4+, IE 6 - 9 and some mobile browsers."]
},
"flexie": {
"name": "Flexie",
"authors": ["Richard Herrera"],
"href": "http://github.com/doctyper/flexie",
"licenses": ["MIT"],
"notes": ["Flexible box model - old spec from 2009. (flexbox) Supports: box-orient, box-align, box-direction, box-pack, box-flex, box-ordinal-group"]
}
}

0 comments on commit 85bfe05

Please sign in to comment.