Permalink
Browse files

visibility:hidden on generated content test was inside content prop, …

…moved out. Version bump to 2.0.6
  • Loading branch information...
1 parent 3371eff commit e4a08d0ef619b8896ae37194d139e3bde6a67a3b @ryanseddon ryanseddon committed Jun 16, 2011
Showing with 26 additions and 5 deletions.
  1. +21 −0 feature-detects/url-data-uri.js
  2. +5 −5 modernizr.js
View
21 feature-detects/url-data-uri.js
@@ -0,0 +1,21 @@
+// data uri test.
+// https://github.com/Modernizr/Modernizr/issues/14
+
+
+// This test is ascynchronous. Watch out.
+
+(function(){
+
+ var datauri = new Image();
+
+
+ datauri.onerror = function() {
+ Modernizr.addTest('datauri', function () { return false; });
+ };
+ datauri.onload = function() {
+ Modernizr.addTest('datauri', function () { return (datauri.width == 1 && datauri.height == 1); });
+ };
+
+ datauri.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";
+
+})();
View
10 modernizr.js
@@ -1,5 +1,5 @@
/*!
- * Modernizr v2.0.3
+ * Modernizr v2.0.6
* http://www.modernizr.com
*
* Copyright (c) 2009-2011 Faruk Ates, Paul Irish, Alex Sexton
@@ -24,7 +24,7 @@
window.Modernizr = (function( window, document, undefined ) {
- var version = '2.0.3',
+ var version = '2.0.6',
Modernizr = {},
@@ -273,15 +273,15 @@ window.Modernizr = (function( window, document, undefined ) {
})([
// Pass in styles to be injected into document
- /*>>fontface*/ '@font-face {font-family:"font";src:url("//:")}' /*>>fontface*/
+ /*>>fontface*/ '@font-face {font-family:"font";src:url("https://")}' /*>>fontface*/
/*>>touch*/ ,['@media (',prefixes.join('touch-enabled),('),mod,')',
'{#touch{top:9px;position:absolute}}'].join('') /*>>touch*/
/*>>csstransforms3d*/ ,['@media (',prefixes.join('transform-3d),('),mod,')',
'{#csstransforms3d{left:9px;position:absolute}}'].join('')/*>>csstransforms3d*/
- /*>>generatedcontent*/,['#generatedcontent:after{content:"',smile,'"}'].join('') /*>>generatedcontent*/
+ /*>>generatedcontent*/,['#generatedcontent:after{content:"',smile,'";visibility:hidden}'].join('') /*>>generatedcontent*/
],
[
/*>>fontface*/ 'fontface' /*>>fontface*/
@@ -496,7 +496,7 @@ window.Modernizr = (function( window, document, undefined ) {
// and then querying the style.background property value for the number of
// occurrences of "url(" is a reliable method for detecting ACTUAL support for this!
- setCss('background:url(//:),url(//:),red url(//:)');
+ setCss('background:url(https://),url(https://),red url(https://)');
// If the UA supports multiple backgrounds, there should be three occurrences
// of the string "url(" in the return value for elemStyle.background

0 comments on commit e4a08d0

Please sign in to comment.