OLD | NEW |
(Empty) | |
| 1 /* Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. */ |
| 4 |
| 5 /* Set the global 'box-sizing' state to 'border-box'. |
| 6 * *::after and *::before used to select pseudo-elements not selectable by *. */ |
| 7 |
| 8 *, |
| 9 *::after, |
| 10 *::before { |
| 11 box-sizing: border-box; |
| 12 } |
| 13 |
| 14 /* Remove all margins and padding from certain element and add word wrap. */ |
| 15 |
| 16 blockquote, |
| 17 body, |
| 18 caption, |
| 19 dd, |
| 20 dl, |
| 21 fieldset, |
| 22 figure, |
| 23 form, |
| 24 h1, |
| 25 h2, |
| 26 h3, |
| 27 h4, |
| 28 h5, |
| 29 h6, |
| 30 hr, |
| 31 legend, |
| 32 ol, |
| 33 p, |
| 34 pre, |
| 35 ul, |
| 36 table, |
| 37 td, |
| 38 th { |
| 39 margin: 0; |
| 40 padding: 0; |
| 41 word-wrap: break-word; |
| 42 } |
| 43 |
| 44 /* Prevent 'sub' and 'sup' affecting 'line-height'. */ |
| 45 |
| 46 sub, |
| 47 sup { |
| 48 font-size: 75%; |
| 49 line-height: 0; |
| 50 position: relative; |
| 51 vertical-align: baseline; |
| 52 } |
| 53 |
| 54 sup { |
| 55 top: -0.5em; |
| 56 } |
| 57 |
| 58 sub { |
| 59 bottom: -0.25em; |
| 60 } |
| 61 |
| 62 /* Remove most spacing between table cells. */ |
| 63 |
| 64 table { |
| 65 border-collapse: collapse; |
| 66 border-spacing: 0; |
| 67 } |
| 68 |
| 69 td, |
| 70 th { |
| 71 padding: 0; |
| 72 } |
| 73 |
| 74 /* Base typography. */ |
| 75 |
| 76 body, |
| 77 html { |
| 78 font-size: 14px; |
| 79 line-height: 1.4; |
| 80 text-rendering: optimizeLegibility; |
| 81 overflow-x: hidden; |
| 82 -webkit-overflow-scrolling: touch; |
| 83 } |
| 84 |
| 85 /* Classes for light, dark and sepia themes. |
| 86 * Must agree with classes returned by useTheme() in dom_distiller_viewer.js |
| 87 * and with CSS class constants in viewer.cc */ |
| 88 |
| 89 .light { |
| 90 color: #333; |
| 91 background-color: #FFF; |
| 92 } |
| 93 |
| 94 .dark { |
| 95 color: #FFF; |
| 96 background-color: #000; |
| 97 } |
| 98 |
| 99 .sepia { |
| 100 color: #000; |
| 101 background-color: rgb(203, 173, 141); |
| 102 } |
| 103 |
| 104 .serif { |
| 105 font-family: serif; |
| 106 } |
| 107 |
| 108 .sans-serif { |
| 109 font-family: 'Open Sans', sans-serif; |
| 110 } |
| 111 |
| 112 .monospace { |
| 113 font-family: monospace; |
| 114 } |
| 115 |
| 116 /* Define vertical rhythm (baseline grid of 4px). */ |
| 117 |
| 118 blockquote, |
| 119 caption, |
| 120 code, |
| 121 dd, |
| 122 dl, |
| 123 fieldset, |
| 124 figure, |
| 125 form, |
| 126 hr, |
| 127 legend, |
| 128 ol, |
| 129 p, |
| 130 pre, |
| 131 q, |
| 132 table, |
| 133 td, |
| 134 th, |
| 135 ul { |
| 136 margin-bottom: 1rem; |
| 137 } |
| 138 |
| 139 h2, |
| 140 h3, |
| 141 h4, |
| 142 h5, |
| 143 h6 { |
| 144 line-height: 1.296; |
| 145 margin-bottom: 0.444rem; |
| 146 } |
| 147 |
| 148 /* Content. */ |
| 149 |
| 150 #content { |
| 151 margin: 0.2rem; |
| 152 } |
| 153 |
| 154 /* Main margins. */ |
| 155 |
| 156 body { |
| 157 max-width: 800px; |
| 158 margin: 0px; |
| 159 } |
| 160 |
| 161 #mainContent { |
| 162 margin: auto 0px; |
| 163 } |
| 164 |
| 165 #articleHeader { |
| 166 background-color: rgb(73, 73, 73); |
| 167 color: white; |
| 168 min-height: 90px; |
| 169 width: 100%; |
| 170 } |
| 171 |
| 172 #titleCollapse { |
| 173 display: block; |
| 174 overflow: hidden; |
| 175 } |
| 176 |
| 177 #titleCollapse .verticalCenterOuter { |
| 178 min-height: 90px; |
| 179 } |
| 180 |
| 181 #titleHolder { |
| 182 padding: 10px 30px; |
| 183 } |
| 184 |
| 185 .verticalCenterOuter { |
| 186 display: table; |
| 187 height: 100%; |
| 188 } |
| 189 |
| 190 .verticalCenterInner { |
| 191 display: table-cell; |
| 192 vertical-align: middle; |
| 193 } |
| 194 |
| 195 /* Link colors for light, dark and sepia themes */ |
| 196 |
| 197 a:link { |
| 198 color: #55F; |
| 199 } |
| 200 |
| 201 a:visited { |
| 202 color: #902290; |
| 203 } |
| 204 |
| 205 blockquote { |
| 206 border-left: 4px solid #eee; |
| 207 padding-left: 1em; |
| 208 } |
| 209 |
| 210 cite { |
| 211 color: rgba(0, 0, 0, .54); |
| 212 font-style: italic; |
| 213 } |
| 214 |
| 215 hr { |
| 216 background-color: #e4dfdf; |
| 217 border: none; |
| 218 height: 1px; |
| 219 margin: inherit auto; |
| 220 width: 75%; |
| 221 } |
| 222 |
| 223 h1 { |
| 224 font-size: 1.7rem; |
| 225 line-height: 1.296; |
| 226 margin-bottom: 0.444rem; |
| 227 } |
| 228 |
| 229 q { |
| 230 color: #222; |
| 231 display:block; |
| 232 font-size: 1.5rem; |
| 233 font-style: italic; |
| 234 font-weight: 600; |
| 235 line-height: 1.444; |
| 236 } |
| 237 |
| 238 embed, |
| 239 img, |
| 240 object, |
| 241 video { |
| 242 max-width: 100%; |
| 243 } |
| 244 |
| 245 img { |
| 246 display: block; |
| 247 height: auto; |
| 248 margin: 0 auto 0.6rem auto; |
| 249 } |
| 250 |
| 251 /* TODO(nyquist): set these classes directly in the dom distiller. */ |
| 252 |
| 253 embed+[class*='caption'], |
| 254 figcaption, |
| 255 img+[class*='caption'], |
| 256 object+[class*='caption'], |
| 257 video+[class*='caption'] { |
| 258 color: rgba(0,0,0,.54); |
| 259 display: table; |
| 260 font-style: italic; |
| 261 margin: 0 auto; |
| 262 } |
| 263 |
| 264 ol, |
| 265 ul { |
| 266 margin-left: 1.296rem; |
| 267 } |
| 268 |
| 269 .light code, |
| 270 .light pre, |
| 271 .sepia code, |
| 272 .sepia pre { |
| 273 background-color: #f8f8f8; |
| 274 border: 1px solid #eee; |
| 275 border-radius: 2px; |
| 276 } |
| 277 |
| 278 .dark code, |
| 279 .dark pre { |
| 280 background-color: #333; |
| 281 border: 1px solid #555; |
| 282 border-radius: 2px; |
| 283 } |
| 284 |
| 285 pre code { |
| 286 border: none; |
| 287 padding: 0; |
| 288 } |
| 289 |
| 290 pre { |
| 291 line-height: 1.296; |
| 292 overflow-x: scroll; |
| 293 padding: .5em; |
| 294 } |
| 295 |
| 296 .hidden { |
| 297 display: none; |
| 298 } |
| 299 |
| 300 /* Iframe sizing. */ |
| 301 .youtubeContainer { |
| 302 height: 0px; |
| 303 /* This is the perecnt height of a standard HD video. */ |
| 304 padding-bottom: 56.25%; |
| 305 position: relative; |
| 306 width: 100%; |
| 307 } |
| 308 |
| 309 .youtubeIframe { |
| 310 height: 100%; |
| 311 left: 0px; |
| 312 position: absolute; |
| 313 top: 0px; |
| 314 width: 100%; |
| 315 } |
OLD | NEW |