main.css 4.5 KB
Newer Older
1 2 3 4
:root {
	--color-blue: #049EF4;
	--text-color: #444;
	--border-style: 1px solid #EEE;
Y
Yuin Chien 已提交
5
	--header-height: 48px;
6 7
}

M
Mr.doob 已提交
8
@font-face {
9 10
	font-family: 'Roboto Mono';
	src: local('Roboto Mono'), url('../files/RobotoMono-Regular.woff2') format('woff2');
M
Mr.doob 已提交
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
	font-weight: normal;
	font-style: normal;
}

* {
	box-sizing: border-box; /* don't let padding modify width */
}

html, body {
	height: 100%;
}

body {
	margin: 0px;
	overflow: hidden;
26
	font-family: 'Roboto Mono', monospace;
M
Mr.doob 已提交
27
	font-size: 14px;
28
	line-height: 24px;
M
Mr.doob 已提交
29
	background-color: #ffffff;
30
	color: var(--text-color);
M
Mr.doob 已提交
31 32 33 34 35 36 37 38
}

a {
	text-decoration: none;
}

h1 {
	font-size: 18px;
39
	font-weight: 500;
M
Mr.doob 已提交
40 41 42
}

h2 {
43 44
	padding: 8px 0;
	margin: 6px 0 12px 0;
M
Mr.doob 已提交
45 46
	font-size: 14px;
	font-weight: normal;
47
	color: var(--color-blue);
M
Mr.doob 已提交
48 49 50
}

h3 {
51
	margin: 4px 0;
M
Mr.doob 已提交
52 53 54 55 56 57 58
	font-size: 14px;
	line-height: 23px;
	font-weight: 500;
	text-transform: uppercase;
	color: #9E9E9E;
}

Y
Yuin Chien 已提交
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
h1 a {
	color: var(--color-blue);
}

#header {
	display: flex;
  height: 48px;
  border-bottom: var(--border-style);
  align-items: center;
}
#header h1 {
	margin-left: 15px;
	flex: 1;
}

M
Mr.doob 已提交
74 75 76 77 78 79
#panel {
	position: fixed;
	left: 0px;
	width: 300px;
	height: 100%;
	overflow: auto;
80 81 82
	border-right: var(--border-style);
	display: flex;
	flex-direction: column;
Y
Yuin Chien 已提交
83
	transition: 0s 0s height;
84
}
M
Mr.doob 已提交
85 86

	#panel #expandButton {
Y
Yuin Chien 已提交
87 88
		margin-right: 14px;
		margin-left: 4px;
M
Mr.doob 已提交
89 90 91 92
		display: none;
	}

	#panel #sections {
93 94
		font-weight: 500;
		display: flex;
Y
Yuin Chien 已提交
95
		justify-content: center;
96 97
		z-index: 1000;
		position: relative;
Y
Yuin Chien 已提交
98 99
		height: 100%;
		align-items: center;
M
Mr.doob 已提交
100 101 102
	}

		#panel #sections * {
103
			padding: 0 16px;
Y
Yuin Chien 已提交
104 105 106 107 108
			height: 100%;
			position: relative;
			display: flex;
			justify-content: center;
			align-items: center;
109
		}
Y
Yuin Chien 已提交
110 111 112 113 114 115
		#panel #sections .selected:after {
			content: "";
			position: absolute;
			left: 0;
			right: 0;
			bottom: -1px;
116
			border-bottom: 1px solid black;
M
Mr.doob 已提交
117 118 119 120 121 122 123
		}
		#panel #sections a {
			color: #9E9E9E;
		}

	#panel #filter {
		width: 100%;
124 125 126 127 128
		height: 44px;
		padding: 0px 44px;
		font-weight: 500;
		font-size: 14px;
		color: var(--text-color);
M
Mr.doob 已提交
129
		outline: none;
130 131 132 133 134 135
		border: 0px;
		border-bottom: var(--border-style);
		background-size: 20px 20px;
		background-image: url(../files/ic_search_black_24dp.svg);
		background-position: 14px 50%;
		background-repeat: no-repeat;
M
Mr.doob 已提交
136 137 138
	}

	#panel #language {
139
    font-family: 'Roboto Mono', monospace;
M
Mr.doob 已提交
140
		position: absolute;
Y
Yuin Chien 已提交
141
    top: 7px;
142 143 144 145 146 147 148 149 150 151 152
    right: 8px;
    border: 0px;
    font-size: 14px;
		font-weight: 500;
    background: url(ic_arrow_drop_down_black_24dp.svg) no-repeat;
    background-position: right center;
    background-color: white;
    padding: 4px 24px 4px 8px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
M
Mr.doob 已提交
153 154 155 156 157 158
	}

		#panel #language:focus {
			outline: none;
		}

159 160 161 162 163 164 165
	#contentWrapper {
		flex: 1;
    overflow: hidden;
		display: flex;
		flex-direction: column;
		transform: translate3d(0,0,0);
	}
M
Mr.doob 已提交
166
	#panel #content {
167 168 169
		flex: 1;
		overflow: scroll;
		padding: 0 16px 24px 16px;
M
Mr.doob 已提交
170 171 172 173 174
	}

		#panel #content ul {
			list-style-type: none;
			padding: 0px;
175 176 177 178
			margin: 0px 0 24px 0;
		}
		#panel #content ul li {
			margin: 2px 0;
M
Mr.doob 已提交
179 180 181
		}

		#panel #content a {
182
			color: var(--text-color);
M
Mr.doob 已提交
183 184
		}

185 186 187 188
		#panel #content a:hover,
		#panel #content .selected {
			color: var(--color-blue);
		}
M
Mr.doob 已提交
189

190 191 192 193
		#panel #content .selected {
			text-decoration: underline;
		}

M
Mr.doob 已提交
194 195 196 197 198 199 200 201 202 203 204 205 206
		#panel #content .hidden {
			display: none !important;
		}

iframe {
	position: absolute;
	border: 0px;
	left: 300px;
	width: calc(100% - 300px);
	height: 100%;
	overflow: auto;
}

207

M
Mr.doob 已提交
208 209 210
/* mobile */

@media all and ( max-width: 640px ) {
211 212 213
	#panel #expandButton {
		display: block;
	}
M
Mr.doob 已提交
214 215 216 217 218 219 220
	#panel {
		position: absolute;
		left: 0;
		top: 0;
		width: 100%;
		right: 0;
		z-index: 100;
221 222 223
		overflow-x: hidden;
		transition: 0s 0s height;
		border: none;
224 225
		height: var(--header-height);
		transition: 0s 0.2s height;
M
Mr.doob 已提交
226
	}
227 228 229 230 231
	#panel.open {
		height: 100%;
		transition: 0s 0s height;
	}

232
	#panelScrim {
233 234
		pointer-events: none;
		background-color: rgba(0,0,0,0);
M
Mr.doob 已提交
235 236 237
		position: absolute;
		left: 0;
		right: 0;
238
		top: 0;
M
Mr.doob 已提交
239
		bottom: 0;
240
		z-index: 1000;
Y
Yuin Chien 已提交
241
		pointer-events: none;
242
		transition: .2s background-color;
243
	}
244 245
	#panel.open #panelScrim {
		pointer-events: auto;
Y
Yuin Chien 已提交
246
		background-color: rgba(0,0,0,0.4);
247
	}
248

249 250 251 252 253 254 255 256 257 258 259
	#contentWrapper {
		position: absolute;
		right: 0;
		top: 0;
		bottom: 0;
		background: white;
		box-shadow: 0 0 8px rgba(0,0,0,.1);
		width: 300px;
		z-index: 10000;
		transition: .25s transform;
		overflow-x: hidden;
260
		margin-right: -320px;
261
	}
262 263
	#panel.open #contentWrapper {
		transform: translate3d(-320px, 0 ,0);
M
Mr.doob 已提交
264 265 266 267 268
	}

	iframe {
		position: absolute;
		left: 0;
269
		top: var(--header-height);
M
Mr.doob 已提交
270
		width: 100%;
271
		height: calc(100% - var(--header-height));
M
Mr.doob 已提交
272 273
	}
}