summaryrefslogtreecommitdiff
path: root/Tests/LibWeb/Layout/input/grid/grid-template.html
blob: abd8a6970e9cd61a4ea7d0674f70d508a4dcd739 (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<style>
  body {
    font-family: 'SerenitySans';
  }
  .mw-page-container-inner {
    display: grid;
    grid-template: min-content min-content 1fr min-content / 12.25em minmax(0, 1fr);
    grid-template-areas:
      'siteNotice siteNotice'
      'mainMenu pageContent'
      'toc pageContent'
      'footer footer'
  }

  .vector-sitenotice-container {
    grid-area: siteNotice
  }

  .vector-main-menu-container {
    grid-area: mainMenu;
    overflow-anchor: none
  }

  .mw-content-container {
    grid-area: pageContent
  }

  .mw-footer-container {
    grid-area: footer
  }
</style>

<!-- Shouldn't crash :) -->
<div class="mw-page-container-inner">
  <div class="vector-main-menu-container"></div>
  <div class="vector-sitenotice-container"></div>
  <div class="mw-content-container"></div>
  <div class="mw-footer-container"></div>
</div>

<style>
  #page {
    display: grid;
    width: 100%;
    height: 200px;
    grid-template:
      [header-left] "head head" 30px
      [header-right] [main-left] "nav  main" 1fr
      [main-right] [footer-left] "nav  foot" 30px [footer-right] / 120px 1fr;
  }

  header {
    background-color: lime;
    grid-area: head;
  }

  nav {
    background-color: lightblue;
    grid-area: nav;
  }

  main {
    background-color: yellow;
    grid-area: main;
  }

  footer {
    background-color: red;
    grid-area: foot;
  }
</style>

<section id="page">
  <header>Header</header>
  <nav>Navigation</nav>
  <main>Main area</main>
  <footer>Footer</footer>
</section>