blob: 58b92997e69195654abc90d0ad5a0cd3aecb0b9a [file] [log] [blame]
<!DOCTYPE html>
<style>
::selection {
background-color: blue;
color: yellow;
}
::selection:window-inactive {
background-color: rgba(63, 128, 33, 0.95); /* green; alpha < 1 so that we don't blend the background color with white. */
color: black;
}
</style>
<span>Any textual selection in this sentence should have a green background when the window is inactive.</span>
<script>
var span = document.querySelector("span");
window.getSelection().setBaseAndExtent(span, 0, span, 1);
if (window.testRunner)
testRunner.setWindowIsKey(false);
</script>