28 lines
570 B
HTML
28 lines
570 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>This tests that there's no pixel gap between the selection gap and inlines when selected (RTL).</title>
|
|
<style>
|
|
body {
|
|
direction: rtl;
|
|
margin: 0px;
|
|
color: rgba(255, 255, 255, 0);
|
|
font-size: 26px;
|
|
font-family: 'Ahem';
|
|
}
|
|
::selection {
|
|
background: rgba(255, 0, 0, 0.9);
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="container">foo</div>
|
|
bar
|
|
<script>
|
|
var range = document.createRange();
|
|
range.selectNode(document.getElementById("container"));
|
|
window.getSelection().addRange(range);
|
|
</script>
|
|
</body>
|
|
</html>
|