I am facing a challenge with overriding the active
style of links in a universal manner, to restore them to their original state when they cannot be interacted with (such as during scrolling).
In my current code, I implemented this:
.scrolling a:active {
background-color: inherit !important;
color: inherit important!;
}
Regrettably, this causes the link to inherit the colors of its surrounding element rather than reverting to its default non-active state. Is there a way to have these links adopt the standard anchor tag styles regardless of their context? I would like to avoid creating overrides for every link type on the page if possible.
To clarify further, I am unable to use a method like this:
a, .scrolling a:active {
color: red;
background-color: white;
}
Because various links on the site utilize different color schemes, necessitating a separate rule for each link type. While this approach is feasible, I am interested in discovering a global rule that can be applied universally.