Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change webview find on page result style using css?

In an Electron webview using findInPage, can you use css to change the result colors?

enter image description here

In the above image, the current find result is highlighted in orange while additional results are highlighted with yellow. I'd like to tweak the styling of both of these

like image 359
Matt Bierner Avatar asked Jul 07 '17 21:07

Matt Bierner


1 Answers

body{
background-color:#000;
color:#fff;
}
h2::-moz-selection { /*Firefox*/
    color: #000;
    background: #FF9800;
}
::-moz-selection { /*Firefox */
    color: #000;
    background: yellow;
}
h2::selection {
    color: #000;
    background: #FF9800;
}
::selection {
       color: #000;
    background: yellow;
}
<h2>Select some text on this page:</h2>
<p>This is a paragraph.</p>
<div>This is some text in a div element.</div>
like image 76
Farhad Bagherlo Avatar answered Nov 16 '22 02:11

Farhad Bagherlo