summaryrefslogtreecommitdiffstats
path: root/devtools/client/inspector/rules/test/doc_media_queries.html
blob: f4706dad87747b5daf3452b59a0fee2edbe3564e (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<html>
<head>
  <title>test</title>
  <script type="application/javascript">

  </script>
  <style>
    div {
      width: 1000px;
      height: 100px;
      background-color: #f00;
    }

    @media screen and (min-width: 1px) {
      div {
        width: 200px;
        background-color: yellow;
      }
    }

    @media (prefers-color-scheme: dark) {
      div {
        background-color: darkblue;
      }
    }
  </style>
  <script>
    "use strict";
    if (window.location.search == "?constructed") {
      const sheet = new CSSStyleSheet();
      sheet.replaceSync(`div { z-index: 0 }`);
      document.adoptedStyleSheets.push(sheet);
    }
  </script>
</head>
<body>
<div></div>
<iframe
  src='https://example.org/document-builder.sjs?html=<style>html { background: cyan;} @media (prefers-color-scheme: dark) {html {background: darkred;}}'>
</iframe>
</body>
</html>