In Firefox, I can search for text using either
- CTRL+F [normal search]
- / [quick search]
- ' [quick search, links only]
I can style user-selected text / links using
a:focusa:active::-moz-selection
However
- the first two seem to apply only to user-selected/focused/activated links (by mouse, or TAB-navigating).
::-moz-selectionseems to be applied only to the text I manually selected, not the text that is selected due to incremental search. The incremental search match is highlighted by Firefox in the greenish color.- when I search only in links ('), the searched part is being highlighted by Firefox in the same greenish color; moreover, the whole link gets outline; when the quick find disappears (~5 secs), the whole link gets
:focusstyle applied -- not before that.
See the screenshot:

Is there any CSS pseudoclass to allow styling of selection that resulted from the search, not the user hand-selection?
onkeypressto capture and prevent'and/orCTRL+Ffrom being pressed and replace it with your own search tool technique. There's probably a library or plugin out there for doing that.