When i select some text in Firefox and then the window or Iframe loses focus (selecting address bar for Example), then the selection becomes grey, even when a different color is specified in css.
How do i change the color for a disabled selection in Firefox?
What I've tried:
<style>::selection { background-color: green; }</style>
<p>lorem ipsum</p>
Edit:
What i want to use here seem to be ::inactive-selection
, but it's not yet implemented in firefox. See https://drafts.csswg.org/css-pseudo-4/#selectordef-inactive-selection
Related bug: https://bugzilla.mozilla.org/show_bug.cgi?id=706209
Does anyone know a workaround? At this point, im considering using some javascript hacks. Any ideas how to do this?