tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

mq-calc-005.html (1002B)


      1 <!doctype html>
      2 <html>
      3 <head>
      4 	<title>Test: evaluation of rem in calc in Media Queries</title>
      5 	<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
      6 	<link rel="help" href="http://www.w3.org/TR/css3-values/#calc-notation">
      7 	<link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/#units">
      8 	<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
      9 	<meta name="assert" content="The size in pixels of the 'rem' unit used in calc inside a media query does not depend on declarations and use the initial value.">
     10 	<style>
     11 		:root { font-size: 30000px; }
     12 		p { font-size: 16px; }
     13 		div {
     14 			width: 100px;
     15 			height: 100px;
     16 			background-color: red;
     17 		}
     18 </style>
     19 </head>
     20 <body>
     21 	<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
     22 	<div></div>
     23 	<script>
     24 	  document.body.offsetTop;
     25 	</script>
     26 	<style>
     27 		@media (min-width: calc(1rem)){
     28 			div { background-color: green; }
     29 		}
     30 	</style>
     31 </body>
     32 </html>