The template of my website sets link color as Blue, and my problem is that if I set the background color of some containers to Green, then any Blue link inside these any such container becomes “almost invisible” and I then need to do something like this:
Repeatedly doing this for each box is probably inefficient.
Is there something more automatic to cover all containers with a Green background anywhere in the website?
Personally, I find the !important is concerning. That means you have some other sort of higher order specificity going on somewhere else. !important should be used as a last resort.
The only thing you could try is mix-blend-mode but it’s unlikely to work for every scenario. If the colours are something like this it might be worth a try.
Though it all depends on how the template is initially set up and how you are changing it.
Again the liberal use of !important sets off alarm bells that things are not good.