modernizr_rails 2.5.3 → 2.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +10 -2
- data/lib/modernizr-rails/source_file.rb +4 -4
- data/lib/modernizr-rails/version.rb +2 -2
- data/lib/modernizr_rails.rb +1 -0
- data/modernizr-rails.gemspec +2 -5
- data/vendor/assets/javascripts/modernizr.js +292 -212
- metadata +18 -48
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d3cc6c147b9d0b325b94df848ddd32e26bd0e686
|
4
|
+
data.tar.gz: c40cb299fd482f4ff745470e2589ebb5831aec5e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5cec9ac7074027a29da0db745016b5eed8a64b16353008e33e744eae94de26fbf1d4bc80c218fbbd5628a10cac403fcd209536fc528019b0c13ebec7b0d509bc
|
7
|
+
data.tar.gz: 2de2147295a721012de3e25aa8faeed88e074535d6fd3c7a420e93c28e19865c72be860c830016a50baa0d3c0c4d291992718ca8afe0a7249ba40c947eae2b2c
|
data/README.md
CHANGED
@@ -8,7 +8,7 @@ The `modernizr_rails` gem integrates the `Modernizr` with the Rails asset pipeli
|
|
8
8
|
|
9
9
|
Add this line to your application's Gemfile:
|
10
10
|
|
11
|
-
gem 'modernizr_rails'
|
11
|
+
gem 'modernizr_rails'
|
12
12
|
|
13
13
|
And then execute:
|
14
14
|
|
@@ -20,10 +20,18 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
## Usage
|
22
22
|
|
23
|
-
Add to your `app/assets/stylesheets/application.js`
|
23
|
+
Add this line to your `app/assets/stylesheets/application.js` to compile as a part of application.js
|
24
24
|
|
25
25
|
//= require modernizr
|
26
26
|
|
27
|
+
Or add this line to your `config/environments/production.rb` to compile as a standalone javascript file
|
28
|
+
|
29
|
+
config.assets.precompile += %w( modernizr.js )
|
30
|
+
|
31
|
+
And include it in your layout like `app/views/layouts/application.html.erb`
|
32
|
+
|
33
|
+
<%= javascript_include_tag 'modernizr' %>
|
34
|
+
|
27
35
|
## Contributing
|
28
36
|
|
29
37
|
1. Fork it
|
@@ -6,12 +6,12 @@ class SourceFile < Thor
|
|
6
6
|
desc 'fetch source files', 'fetch source files from GitHub'
|
7
7
|
def fetch
|
8
8
|
self.destination_root = 'vendor/assets'
|
9
|
-
remote = '
|
10
|
-
get "#{remote}/
|
9
|
+
remote = 'http://modernizr.com/downloads/'
|
10
|
+
get "#{remote}/modernizr-latest.js", 'javascripts/modernizr.js'
|
11
11
|
inside destination_root do
|
12
12
|
version = File.read('javascripts/modernizr.js').match(/version\s=\s'([\d|\.]+)'/)[1]
|
13
|
-
gsub_file '../../lib/modernizr-rails/version.rb', /
|
14
|
-
%Q{
|
13
|
+
gsub_file '../../lib/modernizr-rails/version.rb', /MODERNIZR_VERSION\s=\s'(\d|\.)+'$/ do |match|
|
14
|
+
%Q{MODERNIZR_VERSION = '#{version}'}
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'modernizr-rails'
|
data/modernizr-rails.gemspec
CHANGED
@@ -15,9 +15,6 @@ Gem::Specification.new do |gem|
|
|
15
15
|
gem.require_paths = ['lib']
|
16
16
|
gem.version = Modernizr::Rails::VERSION
|
17
17
|
|
18
|
-
gem.add_dependency 'railties', '
|
19
|
-
gem.add_dependency 'thor',
|
20
|
-
gem.add_development_dependency 'bundler', '~> 1.0'
|
21
|
-
gem.add_development_dependency 'rails', '~> 3.0'
|
22
|
-
gem.add_development_dependency 'sass', '~> 3.1'
|
18
|
+
gem.add_dependency 'railties', '>= 3.0'
|
19
|
+
gem.add_dependency 'thor', '~> 0.14'
|
23
20
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Modernizr v2.
|
2
|
+
* Modernizr v2.6.2
|
3
3
|
* www.modernizr.com
|
4
4
|
*
|
5
5
|
* Copyright (c) Faruk Ates, Paul Irish, Alex Sexton
|
@@ -24,7 +24,7 @@
|
|
24
24
|
|
25
25
|
window.Modernizr = (function( window, document, undefined ) {
|
26
26
|
|
27
|
-
var version = '2.
|
27
|
+
var version = '2.6.2',
|
28
28
|
|
29
29
|
Modernizr = {},
|
30
30
|
|
@@ -96,12 +96,12 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
96
96
|
// Inject element with style element and some CSS rules
|
97
97
|
injectElementWithStyles = function( rule, callback, nodes, testnames ) {
|
98
98
|
|
99
|
-
var style, ret, node,
|
99
|
+
var style, ret, node, docOverflow,
|
100
100
|
div = document.createElement('div'),
|
101
101
|
// After page load injecting a fake body doesn't work so check if body exists
|
102
|
-
body = document.body,
|
102
|
+
body = document.body,
|
103
103
|
// IE6 and 7 won't return offsetWidth or offsetHeight unless it's in the body element, so we fake it.
|
104
|
-
fakeBody = body
|
104
|
+
fakeBody = body || document.createElement('body');
|
105
105
|
|
106
106
|
if ( parseInt(nodes, 10) ) {
|
107
107
|
// In order not to give false positives we create a node for each test
|
@@ -118,21 +118,30 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
118
118
|
// with a 'scoped' element, in our case the soft-hyphen entity as it won't mess with our measurements.
|
119
119
|
// msdn.microsoft.com/en-us/library/ms533897%28VS.85%29.aspx
|
120
120
|
// Documents served as xml will throw if using ­ so use xml friendly encoded version. See issue #277
|
121
|
-
style = ['­','<style>', rule, '</style>'].join('');
|
121
|
+
style = ['­','<style id="s', mod, '">', rule, '</style>'].join('');
|
122
122
|
div.id = mod;
|
123
123
|
// IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody.
|
124
124
|
// Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270
|
125
125
|
(body ? div : fakeBody).innerHTML += style;
|
126
126
|
fakeBody.appendChild(div);
|
127
|
-
if(!body){
|
127
|
+
if ( !body ) {
|
128
128
|
//avoid crashing IE8, if background image is used
|
129
|
-
fakeBody.style.background =
|
129
|
+
fakeBody.style.background = '';
|
130
|
+
//Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible
|
131
|
+
fakeBody.style.overflow = 'hidden';
|
132
|
+
docOverflow = docElement.style.overflow;
|
133
|
+
docElement.style.overflow = 'hidden';
|
130
134
|
docElement.appendChild(fakeBody);
|
131
135
|
}
|
132
136
|
|
133
137
|
ret = callback(div, rule);
|
134
138
|
// If this is done after page load we don't want to remove the body so check if body exists
|
135
|
-
!body
|
139
|
+
if ( !body ) {
|
140
|
+
fakeBody.parentNode.removeChild(fakeBody);
|
141
|
+
docElement.style.overflow = docOverflow;
|
142
|
+
} else {
|
143
|
+
div.parentNode.removeChild(div);
|
144
|
+
}
|
136
145
|
|
137
146
|
return !!ret;
|
138
147
|
|
@@ -165,10 +174,14 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
165
174
|
|
166
175
|
|
167
176
|
/*>>hasevent*/
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
177
|
+
//
|
178
|
+
// isEventSupported determines if a given element supports the given event
|
179
|
+
// kangax.github.com/iseventsupported/
|
180
|
+
//
|
181
|
+
// The following results are known incorrects:
|
182
|
+
// Modernizr.hasEvent("webkitTransitionEnd", elem) // false negative
|
183
|
+
// Modernizr.hasEvent("textInput") // in Webkit. github.com/Modernizr/Modernizr/issues/333
|
184
|
+
// ...
|
172
185
|
isEventSupported = (function() {
|
173
186
|
|
174
187
|
var TAGNAMES = {
|
@@ -212,23 +225,21 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
212
225
|
// TODO :: Add flag for hasownprop ? didn't last time
|
213
226
|
|
214
227
|
// hasOwnProperty shim by kangax needed for Safari 2.0 support
|
215
|
-
_hasOwnProperty = ({}).hasOwnProperty,
|
228
|
+
_hasOwnProperty = ({}).hasOwnProperty, hasOwnProp;
|
216
229
|
|
217
230
|
if ( !is(_hasOwnProperty, 'undefined') && !is(_hasOwnProperty.call, 'undefined') ) {
|
218
|
-
|
231
|
+
hasOwnProp = function (object, property) {
|
219
232
|
return _hasOwnProperty.call(object, property);
|
220
233
|
};
|
221
234
|
}
|
222
235
|
else {
|
223
|
-
|
236
|
+
hasOwnProp = function (object, property) { /* yes, this can give false positives/negatives, but most of the time we don't care about those */
|
224
237
|
return ((property in object) && is(object.constructor.prototype[property], 'undefined'));
|
225
238
|
};
|
226
239
|
}
|
227
240
|
|
228
|
-
//
|
229
|
-
//
|
230
|
-
// ES-5 15.3.4.5
|
231
|
-
// http://es5.github.com/#x15.3.4.5
|
241
|
+
// Adapted from ES5-shim https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js
|
242
|
+
// es5.github.com/#x15.3.4.5
|
232
243
|
|
233
244
|
if (!Function.prototype.bind) {
|
234
245
|
Function.prototype.bind = function bind(that) {
|
@@ -246,7 +257,7 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
246
257
|
|
247
258
|
var F = function(){};
|
248
259
|
F.prototype = target.prototype;
|
249
|
-
var self = new F;
|
260
|
+
var self = new F();
|
250
261
|
|
251
262
|
var result = target.apply(
|
252
263
|
self,
|
@@ -301,15 +312,30 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
301
312
|
}
|
302
313
|
|
303
314
|
/*>>testprop*/
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
315
|
+
|
316
|
+
// testProps is a generic CSS / DOM property test.
|
317
|
+
|
318
|
+
// In testing support for a given CSS property, it's legit to test:
|
319
|
+
// `elem.style[styleName] !== undefined`
|
320
|
+
// If the property is supported it will return an empty string,
|
321
|
+
// if unsupported it will return undefined.
|
322
|
+
|
323
|
+
// We'll take advantage of this quick test and skip setting a style
|
324
|
+
// on our modernizr element, but instead just testing undefined vs
|
325
|
+
// empty string.
|
326
|
+
|
327
|
+
// Because the testing of the CSS property names (with "-", as
|
328
|
+
// opposed to the camelCase DOM properties) is non-portable and
|
329
|
+
// non-standard but works in WebKit and IE (but not Gecko or Opera),
|
330
|
+
// we explicitly reject properties with dashes so that authors
|
331
|
+
// developing in WebKit or IE first don't end up with
|
332
|
+
// browser-specific content by accident.
|
333
|
+
|
309
334
|
function testProps( props, prefixed ) {
|
310
335
|
for ( var i in props ) {
|
311
|
-
|
312
|
-
|
336
|
+
var prop = props[i];
|
337
|
+
if ( !contains(prop, "-") && mStyle[prop] !== undefined ) {
|
338
|
+
return prefixed == 'pfx' ? prop : true;
|
313
339
|
}
|
314
340
|
}
|
315
341
|
return false;
|
@@ -351,7 +377,7 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
351
377
|
*/
|
352
378
|
function testPropsAll( prop, prefixed, elem ) {
|
353
379
|
|
354
|
-
var ucProp = prop.charAt(0).toUpperCase() + prop.
|
380
|
+
var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1),
|
355
381
|
props = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' ');
|
356
382
|
|
357
383
|
// did they call .prefixed('boxSizing') or are we just testing a prop?
|
@@ -366,54 +392,6 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
366
392
|
}
|
367
393
|
/*>>testallprops*/
|
368
394
|
|
369
|
-
/*>>testBundle*/
|
370
|
-
/**
|
371
|
-
* testBundle tests a list of CSS features that require element and style injection.
|
372
|
-
* By bundling them together we can reduce the need to touch the DOM multiple times.
|
373
|
-
*/
|
374
|
-
var testBundle = (function( styles, tests ) {
|
375
|
-
var style = styles.join(''),
|
376
|
-
len = tests.length;
|
377
|
-
|
378
|
-
injectElementWithStyles(style, function( node, rule ) {
|
379
|
-
var style = document.styleSheets[document.styleSheets.length - 1],
|
380
|
-
// IE8 will bork if you create a custom build that excludes both fontface and generatedcontent tests.
|
381
|
-
// So we check for cssRules and that there is a rule available
|
382
|
-
// More here: github.com/Modernizr/Modernizr/issues/288 & github.com/Modernizr/Modernizr/issues/293
|
383
|
-
cssText = style ? (style.cssRules && style.cssRules[0] ? style.cssRules[0].cssText : style.cssText || '') : '',
|
384
|
-
children = node.childNodes, hash = {};
|
385
|
-
|
386
|
-
while ( len-- ) {
|
387
|
-
hash[children[len].id] = children[len];
|
388
|
-
}
|
389
|
-
|
390
|
-
/*>>touch*/ Modernizr['touch'] = ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch || (hash['touch'] && hash['touch'].offsetTop) === 9; /*>>touch*/
|
391
|
-
/*>>csstransforms3d*/ Modernizr['csstransforms3d'] = (hash['csstransforms3d'] && hash['csstransforms3d'].offsetLeft) === 9 && hash['csstransforms3d'].offsetHeight === 3; /*>>csstransforms3d*/
|
392
|
-
/*>>generatedcontent*/Modernizr['generatedcontent'] = (hash['generatedcontent'] && hash['generatedcontent'].offsetHeight) >= 1; /*>>generatedcontent*/
|
393
|
-
/*>>fontface*/ Modernizr['fontface'] = /src/i.test(cssText) &&
|
394
|
-
cssText.indexOf(rule.split(' ')[0]) === 0; /*>>fontface*/
|
395
|
-
}, len, tests);
|
396
|
-
|
397
|
-
})([
|
398
|
-
// Pass in styles to be injected into document
|
399
|
-
/*>>fontface*/ '@font-face {font-family:"font";src:url("https://")}' /*>>fontface*/
|
400
|
-
|
401
|
-
/*>>touch*/ ,['@media (',prefixes.join('touch-enabled),('),mod,')',
|
402
|
-
'{#touch{top:9px;position:absolute}}'].join('') /*>>touch*/
|
403
|
-
|
404
|
-
/*>>csstransforms3d*/ ,['@media (',prefixes.join('transform-3d),('),mod,')',
|
405
|
-
'{#csstransforms3d{left:9px;position:absolute;height:3px;}}'].join('')/*>>csstransforms3d*/
|
406
|
-
|
407
|
-
/*>>generatedcontent*/,['#generatedcontent:after{content:"',smile,'";visibility:hidden}'].join('') /*>>generatedcontent*/
|
408
|
-
],
|
409
|
-
[
|
410
|
-
/*>>fontface*/ 'fontface' /*>>fontface*/
|
411
|
-
/*>>touch*/ ,'touch' /*>>touch*/
|
412
|
-
/*>>csstransforms3d*/ ,'csstransforms3d' /*>>csstransforms3d*/
|
413
|
-
/*>>generatedcontent*/,'generatedcontent' /*>>generatedcontent*/
|
414
|
-
|
415
|
-
]);/*>>testBundle*/
|
416
|
-
|
417
395
|
|
418
396
|
/**
|
419
397
|
* Tests
|
@@ -424,13 +402,13 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
424
402
|
// dev.w3.org/csswg/css3-flexbox
|
425
403
|
|
426
404
|
tests['flexbox'] = function() {
|
427
|
-
return testPropsAll('
|
405
|
+
return testPropsAll('flexWrap');
|
428
406
|
};
|
429
407
|
|
430
408
|
// The *old* flexbox
|
431
409
|
// www.w3.org/TR/2009/WD-css3-flexbox-20090723/
|
432
410
|
|
433
|
-
tests['
|
411
|
+
tests['flexboxlegacy'] = function() {
|
434
412
|
return testPropsAll('boxDirection');
|
435
413
|
};
|
436
414
|
|
@@ -447,19 +425,13 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
447
425
|
return !!(Modernizr['canvas'] && is(document.createElement('canvas').getContext('2d').fillText, 'function'));
|
448
426
|
};
|
449
427
|
|
450
|
-
//
|
451
|
-
|
428
|
+
// webk.it/70117 is tracking a legit WebGL feature detect proposal
|
429
|
+
|
430
|
+
// We do a soft detect which may false positive in order to avoid
|
431
|
+
// an expensive context creation: bugzil.la/732441
|
452
432
|
|
453
433
|
tests['webgl'] = function() {
|
454
|
-
|
455
|
-
var canvas = document.createElement('canvas'),
|
456
|
-
ret;
|
457
|
-
ret = !!(window.WebGLRenderingContext && (canvas.getContext('experimental-webgl') || canvas.getContext('webgl')));
|
458
|
-
canvas = undefined;
|
459
|
-
} catch (e){
|
460
|
-
ret = false;
|
461
|
-
}
|
462
|
-
return ret;
|
434
|
+
return !!window.WebGLRenderingContext;
|
463
435
|
};
|
464
436
|
|
465
437
|
/*
|
@@ -477,32 +449,41 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
477
449
|
*/
|
478
450
|
|
479
451
|
tests['touch'] = function() {
|
480
|
-
|
452
|
+
var bool;
|
453
|
+
|
454
|
+
if(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) {
|
455
|
+
bool = true;
|
456
|
+
} else {
|
457
|
+
injectElementWithStyles(['@media (',prefixes.join('touch-enabled),('),mod,')','{#modernizr{top:9px;position:absolute}}'].join(''), function( node ) {
|
458
|
+
bool = node.offsetTop === 9;
|
459
|
+
});
|
460
|
+
}
|
461
|
+
|
462
|
+
return bool;
|
481
463
|
};
|
482
464
|
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
465
|
+
|
466
|
+
// geolocation is often considered a trivial feature detect...
|
467
|
+
// Turns out, it's quite tricky to get right:
|
468
|
+
//
|
469
|
+
// Using !!navigator.geolocation does two things we don't want. It:
|
470
|
+
// 1. Leaks memory in IE9: github.com/Modernizr/Modernizr/issues/513
|
471
|
+
// 2. Disables page caching in WebKit: webk.it/43956
|
472
|
+
//
|
473
|
+
// Meanwhile, in Firefox < 8, an about:config setting could expose
|
474
|
+
// a false positive that would throw an exception: bugzil.la/688158
|
475
|
+
|
491
476
|
tests['geolocation'] = function() {
|
492
|
-
return
|
477
|
+
return 'geolocation' in navigator;
|
493
478
|
};
|
494
479
|
|
495
|
-
|
496
|
-
// This used to be Modernizr.crosswindowmessaging but the longer
|
497
|
-
// name has been deprecated in favor of a shorter and property-matching one.
|
498
|
-
// The old API is still available in 1.6, but as of 2.0 will throw a warning,
|
499
|
-
// and in the first release thereafter disappear entirely.
|
480
|
+
|
500
481
|
tests['postmessage'] = function() {
|
501
482
|
return !!window.postMessage;
|
502
483
|
};
|
503
484
|
|
504
485
|
|
505
|
-
// Chrome incognito mode used to throw an exception when using openDatabase
|
486
|
+
// Chrome incognito mode used to throw an exception when using openDatabase
|
506
487
|
// It doesn't anymore.
|
507
488
|
tests['websqldatabase'] = function() {
|
508
489
|
return !!window.openDatabase;
|
@@ -513,7 +494,7 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
513
494
|
// - Firefox shipped moz_indexedDB before FF4b9, but since then has been mozIndexedDB
|
514
495
|
// For speed, we don't test the legacy (and beta-only) indexedDB
|
515
496
|
tests['indexedDB'] = function() {
|
516
|
-
return !!testPropsAll("indexedDB",window);
|
497
|
+
return !!testPropsAll("indexedDB", window);
|
517
498
|
};
|
518
499
|
|
519
500
|
// documentMode logic from YUI to filter out IE8 Compat Mode
|
@@ -536,15 +517,12 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
536
517
|
return ('draggable' in div) || ('ondragstart' in div && 'ondrop' in div);
|
537
518
|
};
|
538
519
|
|
539
|
-
//
|
540
|
-
//
|
520
|
+
// FF3.6 was EOL'ed on 4/24/12, but the ESR version of FF10
|
521
|
+
// will be supported until FF19 (2/12/13), at which time, ESR becomes FF17.
|
522
|
+
// FF10 still uses prefixes, so check for it until then.
|
523
|
+
// for more ESR info, see: mozilla.org/en-US/firefox/organizations/faq/
|
541
524
|
tests['websockets'] = function() {
|
542
|
-
|
543
|
-
if ( window[cssomPrefixes[i] + 'WebSocket'] ){
|
544
|
-
return true;
|
545
|
-
}
|
546
|
-
}
|
547
|
-
return 'WebSocket' in window;
|
525
|
+
return 'WebSocket' in window || 'MozWebSocket' in window;
|
548
526
|
};
|
549
527
|
|
550
528
|
|
@@ -576,19 +554,13 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
576
554
|
// If the UA supports multiple backgrounds, there should be three occurrences
|
577
555
|
// of the string "url(" in the return value for elemStyle.background
|
578
556
|
|
579
|
-
return /(url\s*\(.*?){3}
|
557
|
+
return (/(url\s*\(.*?){3}/).test(mStyle.background);
|
580
558
|
};
|
581
559
|
|
582
560
|
|
583
|
-
// In testing support for a given CSS property, it's legit to test:
|
584
|
-
// `elem.style[styleName] !== undefined`
|
585
|
-
// If the property is supported it will return an empty string,
|
586
|
-
// if unsupported it will return undefined.
|
587
|
-
|
588
|
-
// We'll take advantage of this quick test and skip setting a style
|
589
|
-
// on our modernizr element, but instead just testing undefined vs
|
590
|
-
// empty string.
|
591
561
|
|
562
|
+
// this will false positive in Opera Mini
|
563
|
+
// github.com/Modernizr/Modernizr/issues/396
|
592
564
|
|
593
565
|
tests['backgroundsize'] = function() {
|
594
566
|
return testPropsAll('backgroundSize');
|
@@ -627,11 +599,11 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
627
599
|
// The non-literal . in this regex is intentional:
|
628
600
|
// German Chrome returns this value as 0,55
|
629
601
|
// github.com/Modernizr/Modernizr/issues/#issue/59/comment/516632
|
630
|
-
return /^0.55
|
602
|
+
return (/^0.55$/).test(mStyle.opacity);
|
631
603
|
};
|
632
604
|
|
633
605
|
|
634
|
-
// Note, Android < 4 will pass this test, but can only animate
|
606
|
+
// Note, Android < 4 will pass this test, but can only animate
|
635
607
|
// a single property at a time
|
636
608
|
// daneden.me/2011/12/putting-up-with-androids-bullshit/
|
637
609
|
tests['cssanimations'] = function() {
|
@@ -659,9 +631,9 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
659
631
|
|
660
632
|
setCss(
|
661
633
|
// legacy webkit syntax (FIXME: remove when syntax not in use anymore)
|
662
|
-
(str1 + '-webkit- '.split(' ').join(str2 + str1)
|
663
|
-
// standard syntax // trailing 'background-image:'
|
664
|
-
|
634
|
+
(str1 + '-webkit- '.split(' ').join(str2 + str1) +
|
635
|
+
// standard syntax // trailing 'background-image:'
|
636
|
+
prefixes.join(str3 + str1)).slice(0, -str1.length)
|
665
637
|
);
|
666
638
|
|
667
639
|
return contains(mStyle.backgroundImage, 'gradient');
|
@@ -689,8 +661,10 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
689
661
|
if ( ret && 'webkitPerspective' in docElement.style ) {
|
690
662
|
|
691
663
|
// Webkit allows this media query to succeed only if the feature is enabled.
|
692
|
-
// `@media (transform-3d),(-
|
693
|
-
|
664
|
+
// `@media (transform-3d),(-webkit-transform-3d){ ... }`
|
665
|
+
injectElementWithStyles('@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}', function( node, rule ) {
|
666
|
+
ret = node.offsetLeft === 9 && node.offsetHeight === 3;
|
667
|
+
});
|
694
668
|
}
|
695
669
|
return ret;
|
696
670
|
};
|
@@ -705,15 +679,33 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
705
679
|
// @font-face detection routine by Diego Perini
|
706
680
|
// javascript.nwbox.com/CSSSupport/
|
707
681
|
|
708
|
-
// false positives
|
682
|
+
// false positives:
|
683
|
+
// WebOS github.com/Modernizr/Modernizr/issues/342
|
684
|
+
// WP7 github.com/Modernizr/Modernizr/issues/538
|
709
685
|
tests['fontface'] = function() {
|
710
|
-
|
686
|
+
var bool;
|
687
|
+
|
688
|
+
injectElementWithStyles('@font-face {font-family:"font";src:url("https://")}', function( node, rule ) {
|
689
|
+
var style = document.getElementById('smodernizr'),
|
690
|
+
sheet = style.sheet || style.styleSheet,
|
691
|
+
cssText = sheet ? (sheet.cssRules && sheet.cssRules[0] ? sheet.cssRules[0].cssText : sheet.cssText || '') : '';
|
692
|
+
|
693
|
+
bool = /src/i.test(cssText) && cssText.indexOf(rule.split(' ')[0]) === 0;
|
694
|
+
});
|
695
|
+
|
696
|
+
return bool;
|
711
697
|
};
|
712
698
|
/*>>fontface*/
|
713
699
|
|
714
700
|
// CSS generated content detection
|
715
701
|
tests['generatedcontent'] = function() {
|
716
|
-
|
702
|
+
var bool;
|
703
|
+
|
704
|
+
injectElementWithStyles(['#',mod,'{font:0/0 a}#',mod,':after{content:"',smile,'";visibility:hidden;font:3px/1 a}'].join(''), function( node ) {
|
705
|
+
bool = node.offsetHeight >= 3;
|
706
|
+
});
|
707
|
+
|
708
|
+
return bool;
|
717
709
|
};
|
718
710
|
|
719
711
|
|
@@ -742,6 +734,7 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
742
734
|
bool = new Boolean(bool);
|
743
735
|
bool.ogg = elem.canPlayType('video/ogg; codecs="theora"') .replace(/^no$/,'');
|
744
736
|
|
737
|
+
// Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546
|
745
738
|
bool.h264 = elem.canPlayType('video/mp4; codecs="avc1.42E01E"') .replace(/^no$/,'');
|
746
739
|
|
747
740
|
bool.webm = elem.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,'');
|
@@ -756,7 +749,7 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
756
749
|
var elem = document.createElement('audio'),
|
757
750
|
bool = false;
|
758
751
|
|
759
|
-
try {
|
752
|
+
try {
|
760
753
|
if ( bool = !!elem.canPlayType ) {
|
761
754
|
bool = new Boolean(bool);
|
762
755
|
bool.ogg = elem.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,'');
|
@@ -766,7 +759,7 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
766
759
|
// developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements
|
767
760
|
// bit.ly/iphoneoscodecs
|
768
761
|
bool.wav = elem.canPlayType('audio/wav; codecs="1"') .replace(/^no$/,'');
|
769
|
-
bool.m4a = ( elem.canPlayType('audio/x-m4a;') ||
|
762
|
+
bool.m4a = ( elem.canPlayType('audio/x-m4a;') ||
|
770
763
|
elem.canPlayType('audio/aac;')) .replace(/^no$/,'');
|
771
764
|
}
|
772
765
|
} catch(e) { }
|
@@ -781,7 +774,7 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
781
774
|
// `('localStorage' in window) && ` test first because otherwise Firefox will
|
782
775
|
// throw bugzil.la/365772 if cookies are disabled
|
783
776
|
|
784
|
-
// Also in iOS5 Private Browsing mode,
|
777
|
+
// Also in iOS5 Private Browsing mode, attempting to use localStorage.setItem
|
785
778
|
// will throw the exception:
|
786
779
|
// QUOTA_EXCEEDED_ERRROR DOM Exception 22.
|
787
780
|
// Peculiarly, getItem and removeItem calls do not throw.
|
@@ -915,7 +908,7 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
915
908
|
docElement.removeChild(inputElem);
|
916
909
|
|
917
910
|
} else if ( /^(search|tel)$/.test(inputElemType) ){
|
918
|
-
// Spec
|
911
|
+
// Spec doesn't define any special parsing or detectable UI
|
919
912
|
// behaviors so we pass these through as true
|
920
913
|
|
921
914
|
// Interestingly, opera fails the earlier test, so it doesn't
|
@@ -925,14 +918,6 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
925
918
|
// Real url and email support comes with prebaked validation.
|
926
919
|
bool = inputElem.checkValidity && inputElem.checkValidity() === false;
|
927
920
|
|
928
|
-
} else if ( /^color$/.test(inputElemType) ) {
|
929
|
-
// chuck into DOM and force reflow for Opera bug in 11.00
|
930
|
-
// github.com/Modernizr/Modernizr/issues#issue/159
|
931
|
-
docElement.appendChild(inputElem);
|
932
|
-
docElement.offsetWidth;
|
933
|
-
bool = inputElem.value != smile;
|
934
|
-
docElement.removeChild(inputElem);
|
935
|
-
|
936
921
|
} else {
|
937
922
|
// If the upgraded input compontent rejects the :) text, we got a winner
|
938
923
|
bool = inputElem.value != smile;
|
@@ -956,7 +941,7 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
956
941
|
// Run through all tests and detect their support in the current UA.
|
957
942
|
// todo: hypothetically we could be doing an array of tests and use a basic loop here.
|
958
943
|
for ( var feature in tests ) {
|
959
|
-
if (
|
944
|
+
if ( hasOwnProp(tests, feature) ) {
|
960
945
|
// run the test, throw the return value into the Modernizr,
|
961
946
|
// then based on that boolean, define an appropriate className
|
962
947
|
// and push it into an array of classes we'll join later.
|
@@ -973,7 +958,6 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
973
958
|
/*>>webforms*/
|
974
959
|
|
975
960
|
|
976
|
-
/*>>addtest*/
|
977
961
|
/**
|
978
962
|
* addTest allows the user to define their own feature tests
|
979
963
|
* the result will be added onto the Modernizr object,
|
@@ -985,7 +969,7 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
985
969
|
Modernizr.addTest = function ( feature, test ) {
|
986
970
|
if ( typeof feature == 'object' ) {
|
987
971
|
for ( var key in feature ) {
|
988
|
-
if (
|
972
|
+
if ( hasOwnProp( feature, key ) ) {
|
989
973
|
Modernizr.addTest( key, feature[ key ] );
|
990
974
|
}
|
991
975
|
}
|
@@ -1004,14 +988,15 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
1004
988
|
|
1005
989
|
test = typeof test == 'function' ? test() : test;
|
1006
990
|
|
1007
|
-
|
991
|
+
if (typeof enableClasses !== "undefined" && enableClasses) {
|
992
|
+
docElement.className += ' ' + (test ? '' : 'no-') + feature;
|
993
|
+
}
|
1008
994
|
Modernizr[feature] = test;
|
1009
995
|
|
1010
996
|
}
|
1011
997
|
|
1012
998
|
return Modernizr; // allow chaining.
|
1013
999
|
};
|
1014
|
-
/*>>addtest*/
|
1015
1000
|
|
1016
1001
|
|
1017
1002
|
// Reset modElem.cssText to nothing to reduce memory footprint.
|
@@ -1019,42 +1004,54 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
1019
1004
|
modElem = inputElem = null;
|
1020
1005
|
|
1021
1006
|
/*>>shiv*/
|
1022
|
-
/*! HTML5 Shiv v3.
|
1007
|
+
/*! HTML5 Shiv v3.6.1 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed */
|
1023
1008
|
;(function(window, document) {
|
1024
|
-
|
1009
|
+
/*jshint evil:true */
|
1025
1010
|
/** Preset options */
|
1026
1011
|
var options = window.html5 || {};
|
1027
1012
|
|
1028
1013
|
/** Used to skip problem elements */
|
1029
|
-
var reSkip = /^<|^(?:button|
|
1014
|
+
var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
|
1015
|
+
|
1016
|
+
/** Not all elements can be cloned in IE **/
|
1017
|
+
var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
|
1030
1018
|
|
1031
1019
|
/** Detect whether the browser supports default html5 styles */
|
1032
1020
|
var supportsHtml5Styles;
|
1033
1021
|
|
1022
|
+
/** Name of the expando, to work with multiple documents or to re-shiv one document */
|
1023
|
+
var expando = '_html5shiv';
|
1024
|
+
|
1025
|
+
/** The id for the the documents expando */
|
1026
|
+
var expanID = 0;
|
1027
|
+
|
1028
|
+
/** Cached data for each document */
|
1029
|
+
var expandoData = {};
|
1030
|
+
|
1034
1031
|
/** Detect whether the browser supports unknown elements */
|
1035
1032
|
var supportsUnknownElements;
|
1036
1033
|
|
1037
1034
|
(function() {
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
}
|
1035
|
+
try {
|
1036
|
+
var a = document.createElement('a');
|
1037
|
+
a.innerHTML = '<xyz></xyz>';
|
1038
|
+
//if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
|
1039
|
+
supportsHtml5Styles = ('hidden' in a);
|
1040
|
+
|
1041
|
+
supportsUnknownElements = a.childNodes.length == 1 || (function() {
|
1042
|
+
// assign a false positive if unable to shiv
|
1043
|
+
(document.createElement)('a');
|
1044
|
+
var frag = document.createDocumentFragment();
|
1045
|
+
return (
|
1046
|
+
typeof frag.cloneNode == 'undefined' ||
|
1047
|
+
typeof frag.createDocumentFragment == 'undefined' ||
|
1048
|
+
typeof frag.createElement == 'undefined'
|
1049
|
+
);
|
1050
|
+
}());
|
1051
|
+
} catch(e) {
|
1052
|
+
supportsHtml5Styles = true;
|
1053
|
+
supportsUnknownElements = true;
|
1054
|
+
}
|
1058
1055
|
|
1059
1056
|
}());
|
1060
1057
|
|
@@ -1085,28 +1082,105 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
1085
1082
|
return typeof elements == 'string' ? elements.split(' ') : elements;
|
1086
1083
|
}
|
1087
1084
|
|
1085
|
+
/**
|
1086
|
+
* Returns the data associated to the given document
|
1087
|
+
* @private
|
1088
|
+
* @param {Document} ownerDocument The document.
|
1089
|
+
* @returns {Object} An object of data.
|
1090
|
+
*/
|
1091
|
+
function getExpandoData(ownerDocument) {
|
1092
|
+
var data = expandoData[ownerDocument[expando]];
|
1093
|
+
if (!data) {
|
1094
|
+
data = {};
|
1095
|
+
expanID++;
|
1096
|
+
ownerDocument[expando] = expanID;
|
1097
|
+
expandoData[expanID] = data;
|
1098
|
+
}
|
1099
|
+
return data;
|
1100
|
+
}
|
1101
|
+
|
1102
|
+
/**
|
1103
|
+
* returns a shived element for the given nodeName and document
|
1104
|
+
* @memberOf html5
|
1105
|
+
* @param {String} nodeName name of the element
|
1106
|
+
* @param {Document} ownerDocument The context document.
|
1107
|
+
* @returns {Object} The shived element.
|
1108
|
+
*/
|
1109
|
+
function createElement(nodeName, ownerDocument, data){
|
1110
|
+
if (!ownerDocument) {
|
1111
|
+
ownerDocument = document;
|
1112
|
+
}
|
1113
|
+
if(supportsUnknownElements){
|
1114
|
+
return ownerDocument.createElement(nodeName);
|
1115
|
+
}
|
1116
|
+
if (!data) {
|
1117
|
+
data = getExpandoData(ownerDocument);
|
1118
|
+
}
|
1119
|
+
var node;
|
1120
|
+
|
1121
|
+
if (data.cache[nodeName]) {
|
1122
|
+
node = data.cache[nodeName].cloneNode();
|
1123
|
+
} else if (saveClones.test(nodeName)) {
|
1124
|
+
node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
|
1125
|
+
} else {
|
1126
|
+
node = data.createElem(nodeName);
|
1127
|
+
}
|
1128
|
+
|
1129
|
+
// Avoid adding some elements to fragments in IE < 9 because
|
1130
|
+
// * Attributes like `name` or `type` cannot be set/changed once an element
|
1131
|
+
// is inserted into a document/fragment
|
1132
|
+
// * Link elements with `src` attributes that are inaccessible, as with
|
1133
|
+
// a 403 response, will cause the tab/window to crash
|
1134
|
+
// * Script elements appended to fragments will execute when their `src`
|
1135
|
+
// or `text` property is set
|
1136
|
+
return node.canHaveChildren && !reSkip.test(nodeName) ? data.frag.appendChild(node) : node;
|
1137
|
+
}
|
1138
|
+
|
1139
|
+
/**
|
1140
|
+
* returns a shived DocumentFragment for the given document
|
1141
|
+
* @memberOf html5
|
1142
|
+
* @param {Document} ownerDocument The context document.
|
1143
|
+
* @returns {Object} The shived DocumentFragment.
|
1144
|
+
*/
|
1145
|
+
function createDocumentFragment(ownerDocument, data){
|
1146
|
+
if (!ownerDocument) {
|
1147
|
+
ownerDocument = document;
|
1148
|
+
}
|
1149
|
+
if(supportsUnknownElements){
|
1150
|
+
return ownerDocument.createDocumentFragment();
|
1151
|
+
}
|
1152
|
+
data = data || getExpandoData(ownerDocument);
|
1153
|
+
var clone = data.frag.cloneNode(),
|
1154
|
+
i = 0,
|
1155
|
+
elems = getElements(),
|
1156
|
+
l = elems.length;
|
1157
|
+
for(;i<l;i++){
|
1158
|
+
clone.createElement(elems[i]);
|
1159
|
+
}
|
1160
|
+
return clone;
|
1161
|
+
}
|
1162
|
+
|
1088
1163
|
/**
|
1089
1164
|
* Shivs the `createElement` and `createDocumentFragment` methods of the document.
|
1090
1165
|
* @private
|
1091
1166
|
* @param {Document|DocumentFragment} ownerDocument The document.
|
1167
|
+
* @param {Object} data of the document.
|
1092
1168
|
*/
|
1093
|
-
function shivMethods(ownerDocument) {
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1169
|
+
function shivMethods(ownerDocument, data) {
|
1170
|
+
if (!data.cache) {
|
1171
|
+
data.cache = {};
|
1172
|
+
data.createElem = ownerDocument.createElement;
|
1173
|
+
data.createFrag = ownerDocument.createDocumentFragment;
|
1174
|
+
data.frag = data.createFrag();
|
1175
|
+
}
|
1098
1176
|
|
1099
1177
|
|
1100
1178
|
ownerDocument.createElement = function(nodeName) {
|
1101
|
-
//
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
// * Script elements appended to fragments will execute when their `src`
|
1107
|
-
// or `text` property is set
|
1108
|
-
var node = (cache[nodeName] || (cache[nodeName] = docCreateElement(nodeName))).cloneNode();
|
1109
|
-
return html5.shivMethods && node.canHaveChildren && !reSkip.test(nodeName) ? frag.appendChild(node) : node;
|
1179
|
+
//abort shiv
|
1180
|
+
if (!html5.shivMethods) {
|
1181
|
+
return data.createElem(nodeName);
|
1182
|
+
}
|
1183
|
+
return createElement(nodeName, ownerDocument, data);
|
1110
1184
|
};
|
1111
1185
|
|
1112
1186
|
ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
|
@@ -1114,12 +1188,12 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
1114
1188
|
'h.shivMethods&&(' +
|
1115
1189
|
// unroll the `createElement` calls
|
1116
1190
|
getElements().join().replace(/\w+/g, function(nodeName) {
|
1117
|
-
|
1118
|
-
frag.createElement(nodeName);
|
1191
|
+
data.createElem(nodeName);
|
1192
|
+
data.frag.createElement(nodeName);
|
1119
1193
|
return 'c("' + nodeName + '")';
|
1120
1194
|
}) +
|
1121
1195
|
');return n}'
|
1122
|
-
)(html5, frag);
|
1196
|
+
)(html5, data.frag);
|
1123
1197
|
}
|
1124
1198
|
|
1125
1199
|
/*--------------------------------------------------------------------------*/
|
@@ -1131,29 +1205,21 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
1131
1205
|
* @returns {Document} The shived document.
|
1132
1206
|
*/
|
1133
1207
|
function shivDocument(ownerDocument) {
|
1134
|
-
|
1135
|
-
|
1136
|
-
return ownerDocument;
|
1208
|
+
if (!ownerDocument) {
|
1209
|
+
ownerDocument = document;
|
1137
1210
|
}
|
1138
|
-
|
1139
|
-
|
1211
|
+
var data = getExpandoData(ownerDocument);
|
1212
|
+
|
1213
|
+
if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
|
1214
|
+
data.hasCSS = !!addStyleSheet(ownerDocument,
|
1140
1215
|
// corrects block display not defined in IE6/7/8/9
|
1141
|
-
'article,aside,
|
1142
|
-
// corrects audio display not defined in IE6/7/8/9
|
1143
|
-
'audio{display:none}' +
|
1144
|
-
// corrects canvas and video display not defined in IE6/7/8/9
|
1145
|
-
'canvas,video{display:inline-block;*display:inline;*zoom:1}' +
|
1146
|
-
// corrects 'hidden' attribute and audio[controls] display not present in IE7/8/9
|
1147
|
-
'[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}' +
|
1216
|
+
'article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}' +
|
1148
1217
|
// adds styling not present in IE6/7/8/9
|
1149
1218
|
'mark{background:#FF0;color:#000}'
|
1150
1219
|
);
|
1151
1220
|
}
|
1152
1221
|
if (!supportsUnknownElements) {
|
1153
|
-
|
1154
|
-
}
|
1155
|
-
if (shived) {
|
1156
|
-
ownerDocument.documentShived = shived;
|
1222
|
+
shivMethods(ownerDocument, data);
|
1157
1223
|
}
|
1158
1224
|
return ownerDocument;
|
1159
1225
|
}
|
@@ -1183,7 +1249,14 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
1183
1249
|
* @memberOf html5
|
1184
1250
|
* @type Boolean
|
1185
1251
|
*/
|
1186
|
-
'shivCSS':
|
1252
|
+
'shivCSS': (options.shivCSS !== false),
|
1253
|
+
|
1254
|
+
/**
|
1255
|
+
* Is equal to true if a browser supports creating unknown/HTML5 elements
|
1256
|
+
* @memberOf html5
|
1257
|
+
* @type boolean
|
1258
|
+
*/
|
1259
|
+
'supportsUnknownElements': supportsUnknownElements,
|
1187
1260
|
|
1188
1261
|
/**
|
1189
1262
|
* A flag to indicate that the document's `createElement` and `createDocumentFragment`
|
@@ -1191,7 +1264,7 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
1191
1264
|
* @memberOf html5
|
1192
1265
|
* @type Boolean
|
1193
1266
|
*/
|
1194
|
-
'shivMethods':
|
1267
|
+
'shivMethods': (options.shivMethods !== false),
|
1195
1268
|
|
1196
1269
|
/**
|
1197
1270
|
* A string to describe the type of `html5` object ("default" or "default print").
|
@@ -1199,8 +1272,15 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
1199
1272
|
* @type String
|
1200
1273
|
*/
|
1201
1274
|
'type': 'default',
|
1275
|
+
|
1202
1276
|
// shivs the document according to the specified `html5` object options
|
1203
|
-
'shivDocument': shivDocument
|
1277
|
+
'shivDocument': shivDocument,
|
1278
|
+
|
1279
|
+
//creates a shived element
|
1280
|
+
createElement: createElement,
|
1281
|
+
|
1282
|
+
//creates a shived documentFragment
|
1283
|
+
createDocumentFragment: createDocumentFragment
|
1204
1284
|
};
|
1205
1285
|
|
1206
1286
|
/*--------------------------------------------------------------------------*/
|
@@ -1231,7 +1311,7 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
1231
1311
|
// A few important notes:
|
1232
1312
|
// * If a browser does not support media queries at all (eg. oldIE) the mq() will always return false
|
1233
1313
|
// * A max-width or orientation query will be evaluated against the current state, which may change later.
|
1234
|
-
// * You must specify values. Eg. If you are testing support for the min-width media query use:
|
1314
|
+
// * You must specify values. Eg. If you are testing support for the min-width media query use:
|
1235
1315
|
// Modernizr.mq('(min-width:0)')
|
1236
1316
|
// usage:
|
1237
1317
|
// Modernizr.mq('only screen and (max-width:768)')
|
@@ -1284,7 +1364,7 @@ window.Modernizr = (function( window, document, undefined ) {
|
|
1284
1364
|
// 'WebkitTransition' : 'webkitTransitionEnd',
|
1285
1365
|
// 'MozTransition' : 'transitionend',
|
1286
1366
|
// 'OTransition' : 'oTransitionEnd',
|
1287
|
-
// 'msTransition' : '
|
1367
|
+
// 'msTransition' : 'MSTransitionEnd',
|
1288
1368
|
// 'transition' : 'transitionend'
|
1289
1369
|
// },
|
1290
1370
|
// transEndEventName = transEndEventNames[ Modernizr.prefixed('transition') ];
|
metadata
CHANGED
@@ -1,72 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: modernizr_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
5
|
-
prerelease:
|
4
|
+
version: 2.6.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Tse-Ching Ho
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
13
|
-
default_executable:
|
11
|
+
date: 2013-05-04 00:00:00.000000000 Z
|
14
12
|
dependencies:
|
15
13
|
- !ruby/object:Gem::Dependency
|
16
14
|
name: railties
|
17
|
-
requirement:
|
18
|
-
none: false
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
19
16
|
requirements:
|
20
|
-
- -
|
17
|
+
- - '>='
|
21
18
|
- !ruby/object:Gem::Version
|
22
19
|
version: '3.0'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
|
-
version_requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.0'
|
26
27
|
- !ruby/object:Gem::Dependency
|
27
28
|
name: thor
|
28
|
-
requirement:
|
29
|
-
none: false
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0.14'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements:
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
name: bundler
|
39
|
-
requirement: &70215073981080 !ruby/object:Gem::Requirement
|
40
|
-
none: false
|
41
|
-
requirements:
|
42
|
-
- - ~>
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
version: '1.0'
|
45
|
-
type: :development
|
46
|
-
prerelease: false
|
47
|
-
version_requirements: *70215073981080
|
48
|
-
- !ruby/object:Gem::Dependency
|
49
|
-
name: rails
|
50
|
-
requirement: &70215073980520 !ruby/object:Gem::Requirement
|
51
|
-
none: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
37
|
requirements:
|
53
38
|
- - ~>
|
54
39
|
- !ruby/object:Gem::Version
|
55
|
-
version: '
|
56
|
-
type: :development
|
57
|
-
prerelease: false
|
58
|
-
version_requirements: *70215073980520
|
59
|
-
- !ruby/object:Gem::Dependency
|
60
|
-
name: sass
|
61
|
-
requirement: &70215073980060 !ruby/object:Gem::Requirement
|
62
|
-
none: false
|
63
|
-
requirements:
|
64
|
-
- - ~>
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
version: '3.1'
|
67
|
-
type: :development
|
68
|
-
prerelease: false
|
69
|
-
version_requirements: *70215073980060
|
40
|
+
version: '0.14'
|
70
41
|
description: Modernizr is a JavaScript library allowing you to use CSS3 & HTML5 while
|
71
42
|
maintaining control over unsupported browsers. This gem integrates Modernizr with
|
72
43
|
Rails asset pipeline for easy of use.
|
@@ -86,31 +57,30 @@ files:
|
|
86
57
|
- lib/modernizr-rails/railtie.rb
|
87
58
|
- lib/modernizr-rails/source_file.rb
|
88
59
|
- lib/modernizr-rails/version.rb
|
60
|
+
- lib/modernizr_rails.rb
|
89
61
|
- modernizr-rails.gemspec
|
90
62
|
- vendor/assets/javascripts/modernizr.js
|
91
|
-
has_rdoc: true
|
92
63
|
homepage: https://github.com/tsechingho/modernizr-rails
|
93
64
|
licenses: []
|
65
|
+
metadata: {}
|
94
66
|
post_install_message:
|
95
67
|
rdoc_options: []
|
96
68
|
require_paths:
|
97
69
|
- lib
|
98
70
|
required_ruby_version: !ruby/object:Gem::Requirement
|
99
|
-
none: false
|
100
71
|
requirements:
|
101
|
-
- -
|
72
|
+
- - '>='
|
102
73
|
- !ruby/object:Gem::Version
|
103
74
|
version: '0'
|
104
75
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
76
|
requirements:
|
107
|
-
- -
|
77
|
+
- - '>='
|
108
78
|
- !ruby/object:Gem::Version
|
109
79
|
version: '0'
|
110
80
|
requirements: []
|
111
81
|
rubyforge_project:
|
112
|
-
rubygems_version:
|
82
|
+
rubygems_version: 2.0.0
|
113
83
|
signing_key:
|
114
|
-
specification_version:
|
84
|
+
specification_version: 4
|
115
85
|
summary: Integrate Modernizr javascript library with Rails asset pipeline
|
116
86
|
test_files: []
|