main.scss 2.85 KB
Newer Older
Abseil Team's avatar
Abseil Team committed
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
// Styles for GoogleTest docs website on GitHub Pages.
// Color variables are defined in
// https://github.com/pages-themes/primer/tree/master/_sass/primer-support/lib/variables

$sidebar-width: 260px;

body {
  display: flex;
  margin: 0;
}

.sidebar {
  background: $black;
  color: $text-white;
  flex-shrink: 0;
  height: 100vh;
  overflow: auto;
  position: sticky;
  top: 0;
  width: $sidebar-width;
}

.sidebar h1 {
  font-size: 1.5em;
}

.sidebar h2 {
  color: $gray-light;
  font-size: 0.8em;
  font-weight: normal;
  margin-bottom: 0.8em;
  padding-left: 2.5em;
  text-transform: uppercase;
}

.sidebar .header {
  background: $black;
  padding: 2em;
  position: sticky;
  top: 0;
  width: 100%;
}

.sidebar .header a {
  color: $text-white;
  text-decoration: none;
}

.sidebar .nav-toggle {
  display: none;
}

.sidebar .expander {
  cursor: pointer;
  display: none;
  height: 3em;
  position: absolute;
  right: 1em;
  top: 1.5em;
  width: 3em;
}

.sidebar .expander .arrow {
Abseil Team's avatar
Abseil Team committed
64
  border: solid $white;
Abseil Team's avatar
Abseil Team committed
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
  border-width: 0 3px 3px 0;
  display: block;
  height: 0.7em;
  margin: 1em auto;
  transform: rotate(45deg);
  transition: transform 0.5s;
  width: 0.7em;
}

.sidebar nav {
  width: 100%;
}

.sidebar nav ul {
  list-style-type: none;
  margin-bottom: 1em;
  padding: 0;

  &:last-child {
    margin-bottom: 2em;
  }

  a {
   text-decoration: none;
  }

  li {
    color: $text-white;
    padding-left: 2em;
    text-decoration: none;
  }

  li.active {
    background: $border-gray-darker;
    font-weight: bold;
  }

  li:hover {
    background: $border-gray-darker;
  }
}

.main {
Abseil Team's avatar
Abseil Team committed
108
  background-color: $bg-gray;
Abseil Team's avatar
Abseil Team committed
109
110
111
112
  width: calc(100% - #{$sidebar-width});
}

.main .main-inner {
Abseil Team's avatar
Abseil Team committed
113
114
115
116
117
118
119
  background-color: $white;
  padding: 2em;
}

.main .footer {
  margin: 0;
  padding: 2em;
Abseil Team's avatar
Abseil Team committed
120
121
122
123
124
125
126
}

.main table th {
  text-align: left;
}

.main .callout {
Abseil Team's avatar
Abseil Team committed
127
  border-left: 0.25em solid $white;
Abseil Team's avatar
Abseil Team committed
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
  padding: 1em;

  a {
    text-decoration: underline;
  }

  &.important {
    background-color: $bg-yellow-light;
    border-color: $bg-yellow;
    color: $black;
  }

  &.note {
    background-color: $bg-blue-light;
    border-color: $text-blue;
    color: $text-blue;
  }

  &.tip {
    background-color: $green-000;
    border-color: $green-700;
    color: $green-700;
  }

  &.warning {
    background-color: $red-000;
    border-color: $text-red;
    color: $text-red;
  }
}

.main .good pre {
  background-color: $bg-green-light;
}

.main .bad pre {
  background-color: $red-000;
}

@media all and (max-width: 768px) {
  body {
    flex-direction: column;
  }

  .sidebar {
    height: auto;
    position: relative;
    width: 100%;
  }

  .sidebar .expander {
    display: block;
  }

  .sidebar nav {
    height: 0;
    overflow: hidden;
  }

  .sidebar .nav-toggle:checked {
    & ~ nav {
      height: auto;
    }

    & + .expander .arrow {
      transform: rotate(-135deg);
    }
  }

  .main {
    width: 100%;
  }
}