Open chrisblakley opened 2 years ago
I wonder if it is possible to highlight unlinked images using :has()
and :not()
together...?
Ex: This is fine:
<a href="#"><img src="#" /></a>
But this would be highlighted:
<img src="#" />
So it would need to be like img:not(a:has(img))
but I don't think :has() can go down and up and back down like that... Might just stick with JavaScript for this one...
Nebula already implements a handful of CSS selectors that are activated during audit mode. There are a whole ton more that may be useful to add.
A great collection if ideas here: https://github.com/lorenzodelijser/lint-html-with-css/blob/main/linthtmlwithcss.css
This library has a lot of these: https://github.com/Heydon/REVENGE.CSS/blob/master/revenge.css
Great convos on Twitter: https://twitter.com/hashtag/lintHTMLwithCSS
A few that I like: