UNPKG

modernizr

Version:

Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.

20 lines (19 loc) 594 B
/*! { "name": "CSS general sibling selector", "caniuse": "css-sel3", "property": "siblinggeneral", "tags": ["css"], "notes": [{ "name": "Related Github Issue", "href": "https://github.com/Modernizr/Modernizr/pull/889" }] } !*/ define(['Modernizr', 'createElement', 'testStyles'], function( Modernizr, createElement, testStyles ) { Modernizr.addTest('siblinggeneral', function(){ return testStyles('#modernizr div {width:100px} #modernizr div ~ div {width:200px;display:block}', function(elem, rule){ return elem.lastChild.offsetWidth == 200; }, 2); }); });