siblinggeneral.js 590 B

12345678910111213141516171819
  1. /*!
  2. {
  3. "name": "CSS general sibling selector",
  4. "caniuse": "css-sel3",
  5. "property": "siblinggeneral",
  6. "tags": ["css"],
  7. "notes": [{
  8. "name": "Related Github Issue",
  9. "href": "https://github.com/Modernizr/Modernizr/pull/889"
  10. }]
  11. }
  12. !*/
  13. define(['Modernizr', 'createElement', 'testStyles'], function(Modernizr, createElement, testStyles) {
  14. Modernizr.addTest('siblinggeneral', function() {
  15. return testStyles('#modernizr div {width:100px} #modernizr div ~ div {width:200px;display:block}', function(elem) {
  16. return elem.lastChild.offsetWidth === 200;
  17. }, 2);
  18. });
  19. });