mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-17 15:11:04 +00:00
23 lines
669 B
JavaScript
23 lines
669 B
JavaScript
/*!
|
|
{
|
|
"name": "CSS :valid pseudo-class",
|
|
"property": "cssvalid",
|
|
"notes": [{
|
|
"name": "MDN Docs",
|
|
"href": "https://developer.mozilla.org/en-US/docs/Web/CSS/:valid"
|
|
}]
|
|
}
|
|
!*/
|
|
/* DOC
|
|
Detects support for the ':valid' CSS pseudo-class.
|
|
*/
|
|
define(['Modernizr', 'testStyles', 'createElement'], function(Modernizr, testStyles, createElement) {
|
|
Modernizr.addTest('cssvalid', function() {
|
|
return testStyles('#modernizr input{height:0;border:0;padding:0;margin:0;width:10px} #modernizr input:valid{width:50px}', function(elem) {
|
|
var input = createElement('input');
|
|
elem.appendChild(input);
|
|
return input.clientWidth > 10;
|
|
});
|
|
});
|
|
});
|