blob: 0f236cb3df999e9fb7d90ebf5ad05e97b3c269a1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<!doctype html>
<title>CSS Test: Test for rem units on the root element</title>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="help" href="https://drafts.csswg.org/css-values/#rem">
<link rel="match" href="rem-root-font-size-restyle-1-ref.html">
<style>
:root {
font-size: 2rem;
}
div {
width: 10rem;
height: 10rem;
background: green;
}
</style>
<div></div>
<script>
document.documentElement.offsetTop;
// Force a style recalc.
document.documentElement.style.color = "green";
</script>
|