Any way to enable full styling of :visited links in firefox?

179 Views Asked by At

I want to enable opacity change of visited links for personal use in my local browser only, for a userscript. Is there any hidden setting for this?

1

There are 1 best solutions below

3
str On

No, you cannot do that. See styling restrictions for :visited:

For privacy reasons, browsers strictly limit which styles you can apply using this pseudo-class, and how they can be used:

  • Allowable CSS properties are color, background-color, border-color, border-bottom-color, border-left-color, border-right-color, border-top-color, column-rule-color, and outline-color.
  • Allowable SVG attributes are fill and stroke.
  • The alpha component of the allowed styles will be ignored. The alpha component of the element's non-:visited state will be used instead, except when that component is 0, in which case the style set in :visited will be ignored entirely.
  • Although these styles can be change the appearance of colors to the end user, the window.getComputedStyle method will lie and always return the value of the non-:visited color.

Also see Privacy and the :visited selector.