main.css 4.4 KB
Newer Older
1 2 3 4 5 6 7 8
:root {
	--color-blue: #049EF4;

	--text-color: #444;
	--border-style: 1px solid #EEE;
	--header-height: 80px;
}

M
Mr.doob 已提交
9
@font-face {
10 11
	font-family: 'Roboto Mono';
	src: local('Roboto Mono'), url('../files/RobotoMono-Regular.woff2') format('woff2');
M
Mr.doob 已提交
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
	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;

28
	font-family: 'Roboto Mono', monospace;
M
Mr.doob 已提交
29
	font-size: 14px;
30
	line-height: 24px;
M
Mr.doob 已提交
31 32

	background-color: #ffffff;
33
	color: var(--text-color);
M
Mr.doob 已提交
34 35 36 37 38 39 40 41 42
}

a {
	text-decoration: none;
}

h1 {
	margin-top: 0px; /* reset */
	margin-left: 15px;
43 44
	margin-bottom: 0px;
	padding-top: 12px;
M
Mr.doob 已提交
45 46

	font-size: 18px;
47
	font-weight: 500;
M
Mr.doob 已提交
48 49 50
}

h1 a {
51
	color: var(--color-blue);
M
Mr.doob 已提交
52 53 54
}

h2 {
55 56 57 58 59
	padding: 8px 0;
	margin: 6px 0 12px 0;
	position: sticky;
	top: 0;
	background: white;
M
Mr.doob 已提交
60 61 62 63

	font-size: 14px;
	font-weight: normal;

64 65
	color: var(--color-blue);
  border-bottom: var(--border-style);
M
Mr.doob 已提交
66 67 68
}

h3 {
69
	margin: 4px 0;
M
Mr.doob 已提交
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85

	font-size: 14px;
	line-height: 23px;
	font-weight: 500;
	text-transform: uppercase;

	color: #9E9E9E;
}

#panel {
	position: fixed;
	left: 0px;
	width: 300px;
	height: 100%;
	overflow: auto;

86
	border-right: var(--border-style);
M
Mr.doob 已提交
87

88 89 90
	display: flex;
	flex-direction: column;
}
M
Mr.doob 已提交
91 92 93 94 95

	#panel #expandButton {
		position: absolute;
		right: 14px;
		top: 14px;
96
		z-index: 1000;
M
Mr.doob 已提交
97 98 99 100
		display: none;
	}

	#panel #sections {
101 102 103 104 105 106
		font-weight: 500;
		height: 44px;
		display: flex;
		align-items: center;
		z-index: 1000;
		position: relative;
M
Mr.doob 已提交
107
	}
108 109 110 111 112 113 114 115 116
		#panel #sections:after {
			position: absolute;
			bottom: 0px;
			content: "";
			left: 0;
			right: 0;
			border-bottom: var(--border-style);
			z-index: -1;
		}
M
Mr.doob 已提交
117 118

		#panel #sections * {
119 120 121 122 123 124
			padding: 0 16px;
	    height: 100%;
	    line-height: 44px;
		}
		#panel #sections .selected {
			border-bottom: 1px solid black;
M
Mr.doob 已提交
125 126 127 128 129 130 131
		}
		#panel #sections a {
			color: #9E9E9E;
		}

	#panel #filter {
		width: 100%;
132 133 134 135 136
		height: 44px;
		padding: 0px 44px;
		font-weight: 500;
		font-size: 14px;
		color: var(--text-color);
M
Mr.doob 已提交
137
		outline: none;
138 139 140 141 142 143
		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 已提交
144 145 146
	}

	#panel #language {
147
    font-family: 'Roboto Mono', monospace;
M
Mr.doob 已提交
148
		position: absolute;
149 150 151 152 153 154 155 156 157 158 159 160
    top: 8px;
    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 已提交
161 162 163 164 165 166
	}

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

167 168 169 170 171 172 173
	#contentWrapper {
		flex: 1;
    overflow: hidden;
		display: flex;
		flex-direction: column;
		transform: translate3d(0,0,0);
	}
M
Mr.doob 已提交
174
	#panel #content {
175 176 177
		flex: 1;
		overflow: scroll;
		padding: 0 16px 24px 16px;
M
Mr.doob 已提交
178 179 180 181 182
	}

		#panel #content ul {
			list-style-type: none;
			padding: 0px;
183 184 185 186
			margin: 0px 0 24px 0;
		}
		#panel #content ul li {
			margin: 2px 0;
M
Mr.doob 已提交
187 188 189
		}

		#panel #content a {
190
			color: var(--text-color);
M
Mr.doob 已提交
191 192
		}

193 194 195 196
		#panel #content a:hover,
		#panel #content .selected {
			color: var(--color-blue);
		}
M
Mr.doob 已提交
197 198

		#panel #content .selected {
199
	    text-decoration: line-through;
M
Mr.doob 已提交
200 201
		}

202

M
Mr.doob 已提交
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227
		#panel #content .hidden {
			display: none !important;
		}

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

/* mobile */

@media all and ( max-width: 640px ) {

	#panel {
		position: absolute;
		left: 0;
		top: 0;
		height: 100%;
		width: 100%;
		right: 0;
		z-index: 100;
228 229 230
		overflow-x: hidden;
		transition: 0s 0s height;
		border: none;
M
Mr.doob 已提交
231
	}
232 233
	#panelScrim {
		background: black;
M
Mr.doob 已提交
234 235 236
		position: absolute;
		left: 0;
		right: 0;
237
		top: 0;
M
Mr.doob 已提交
238
		bottom: 0;
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269
		z-index: 1000;
		opacity: .6;
		pointer-events: auto;
		transition: .2s opacity;
	}
	#panel.collapsed {
		height: var(--header-height);
		transition: 0s .2s height;
	}
	#panel.collapsed #panelScrim {
		opacity: 0;
		pointer-events: auto;
	}

	#panel #expandButton {
		display: block;
	}
	#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;
	}
	#panel.collapsed #contentWrapper {
		transform: translate3d(120%,0,0);
M
Mr.doob 已提交
270 271 272 273 274
	}

	iframe {
		position: absolute;
		left: 0;
275
		top: var(--header-height);
M
Mr.doob 已提交
276
		width: 100%;
277
		height: calc(100% - var(--header-height));
M
Mr.doob 已提交
278 279
	}
}