1234567891011121314151617181920212223 |
- Modernizr.addTest('subpixelfont', function() {
- var bool,
- styles = "#modernizr{position: absolute; top: -10em; visibility:hidden; font: normal 10px arial;}#subpixel{float: left; font-size: 33.3333%;}";
-
-
- Modernizr.testStyles(styles, function(elem) {
- var subpixel = elem.firstChild;
- subpixel.innerHTML = 'This is a text written in Arial';
- bool = window.getComputedStyle ?
- window.getComputedStyle(subpixel, null).getPropertyValue("width") !== '44px'
- : false;
- }, 1, ['subpixel']);
- return bool;
- });
|