mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-17 15:11:04 +00:00
24 lines
756 B
JavaScript
24 lines
756 B
JavaScript
/*!
|
|
{
|
|
"name": "CSS :checked pseudo-selector",
|
|
"caniuse": "css-sel3",
|
|
"property": "checked",
|
|
"tags": ["css"],
|
|
"notes": [{
|
|
"name": "Related Github Issue",
|
|
"href": "https://github.com/Modernizr/Modernizr/pull/879"
|
|
}]
|
|
}
|
|
!*/
|
|
define(['Modernizr', 'createElement', 'testStyles'], function(Modernizr, createElement, testStyles) {
|
|
Modernizr.addTest('checked', function() {
|
|
return testStyles('#modernizr {position:absolute} #modernizr input {margin-left:10px} #modernizr :checked {margin-left:20px;display:block}', function(elem) {
|
|
var cb = createElement('input');
|
|
cb.setAttribute('type', 'checkbox');
|
|
cb.setAttribute('checked', 'checked');
|
|
elem.appendChild(cb);
|
|
return cb.offsetLeft === 20;
|
|
});
|
|
});
|
|
});
|