any-link-attribute-removal.html (626B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS test: Handling of dynamic changes to :any-link selectors</title> 4 <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu"> 5 <link rel="match" href="any-link-attribute-removal-ref.html"> 6 <link rel="help" href="https://drafts.csswg.org/selectors-4/#the-any-link-pseudo"> 7 <style> 8 span { color: green; } 9 :any-link + span { color: red; } 10 </style> 11 <body onload="window.oldColor = getComputedStyle(document.querySelector('span')).color; 12 document.querySelector('a').removeAttribute('href');"> 13 <a href=""></a><span>This should be green</span> 14 </body>