summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/selectors/dir-pseudo-update-document-element.html
blob: 92bf1b4d5f02aa477d4e4e16272803e04da8eb52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html dir="ltr">
<head>
<link rel="match" href="dir-pseudo-update-document-element-ref.html">
<link rel="help" href="https://drafts.csswg.org/selectors-4/#the-dir-pseudo">
<script>
document.documentElement.setAttribute('dir', 'rtl');
</script>
<style>
div {
    width: 100px;
    height: 100px;
    float: left;
}

div:dir(rtl) {
    background-color: green;
}

div:dir(ltr) {
    background-color: red;
}
</style>
</head>
<body>
<div></div>
</body>
</html>