Interesting solution to a very hard problem! I’ve been part way down the path of reacting to dynamic nested backgrounds before, wasted too much time every time. I think we need smarter built-in selectors to be able to do this without jumping through so many hoops. I haven’t tried with shadow DOM encapsulation, though.
Yup, that makes sense. Anchors are one of the few HTML elements which are opinionated about what colour they are. My solution is a little fragile, especially if the site uses a CMS which vomits extra markup into the page. Built-in support would be better.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Interesting solution to a very hard problem! I’ve been part way down the path of reacting to dynamic nested backgrounds before, wasted too much time every time. I think we need smarter built-in selectors to be able to do this without jumping through so many hoops. I haven’t tried with shadow DOM encapsulation, though.
Yup, that makes sense. Anchors are one of the few HTML elements which are opinionated about what colour they are. My solution is a little fragile, especially if the site uses a CMS which vomits extra markup into the page. Built-in support would be better.