Sha256: a6c185d6abe0034c178153ecce5b849364cbd5f90fb530e2b78600345f271ee7

Contents?: true

Size: 952 Bytes

Versions: 144

Compression:

Stored size: 952 Bytes

Contents

/**
 * Unicode special character support
 * 
 * Detection is made by testing missing glyph box rendering against star character
 * If widths are the same, this "probably" means the browser didn't support the star character and rendered a glyph box instead
 * Just need to ensure the font characters have different widths
 * 
 * Warning : positive Unicode support doesn't mean you can use it inside <title>, this seams more related to OS & Language packs
 */
Modernizr.addTest('unicode', function() {
	
	
	var bool,

		missingGlyph = document.createElement('span'),
		
		star = document.createElement('span');

	Modernizr.testStyles('#modernizr{font-family:Arial,sans;font-size:300em;}', function(node) {

		missingGlyph.innerHTML = '&#5987';
		star.innerHTML = '&#9734';		
		
		node.appendChild(missingGlyph);
		node.appendChild(star);
		
		bool = 'offsetWidth' in missingGlyph && missingGlyph.offsetWidth !== star.offsetWidth;
	});

	return bool;

});

Version data entries

144 entries across 144 versions & 7 rubygems

Version Path
jekyll-theme-pirati-7.7.1 _sass/foundation-sites/vendor/modernizr/feature-detects/unicode.js
jekyll-theme-pirati-7.7.0 _sass/foundation-sites/vendor/modernizr/feature-detects/unicode.js
jekyll-theme-pirati-7.6.2 _sass/foundation-sites/vendor/modernizr/feature-detects/unicode.js
jekyll-theme-pirati-7.6.1 _sass/foundation-sites/vendor/modernizr/feature-detects/unicode.js
jekyll-theme-pirati-7.6.0 _sass/foundation-sites/vendor/modernizr/feature-detects/unicode.js
jekyll-theme-pirati-7.5.0 _sass/foundation-sites/vendor/modernizr/feature-detects/unicode.js
jekyll-theme-pirati-7.4.0 _sass/foundation-sites/vendor/modernizr/feature-detects/unicode.js
jekyll-theme-pirati-7.3.0 _sass/foundation-sites/vendor/modernizr/feature-detects/unicode.js
jekyll-theme-pirati-7.2.0 _sass/foundation-sites/vendor/modernizr/feature-detects/unicode.js
jekyll-theme-pirati-7.1.1 _sass/foundation-sites/vendor/modernizr/feature-detects/unicode.js
jekyll-theme-pirati-7.0.0 _sass/foundation-sites/vendor/modernizr/feature-detects/unicode.js
jekyll-theme-pirati-6.9.0 _sass/foundation-sites/vendor/modernizr/feature-detects/unicode.js
jekyll-theme-pirati-6.8.0 _sass/foundation-sites/vendor/modernizr/feature-detects/unicode.js
jekyll-theme-pirati-6.7.2 _sass/foundation-sites/vendor/modernizr/feature-detects/unicode.js
jekyll-theme-pirati-6.7.0 _sass/foundation-sites/vendor/modernizr/feature-detects/unicode.js
jekyll-theme-pirati-6.6.2 _sass/foundation-sites/vendor/modernizr/feature-detects/unicode.js
jekyll-theme-pirati-6.6.1 _sass/foundation-sites/vendor/modernizr/feature-detects/unicode.js
jekyll-theme-pirati-6.6.0 _sass/foundation-sites/vendor/modernizr/feature-detects/unicode.js
jekyll-theme-pirati-6.5.0 _sass/foundation-sites/vendor/modernizr/feature-detects/unicode.js
jekyll-theme-pirati-6.4.0 _sass/foundation-sites/vendor/modernizr/feature-detects/unicode.js