Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Side by Side Diff: components/dom_distiller/core/css/distilledpage.css

Issue 1192363006: Update reader mode viewer according to specs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: subtitle color, table cell padding, simplify striped table color, wide table scrolling Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | components/dom_distiller/core/html/dom_distiller_viewer.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright 2014 The Chromium Authors. All rights reserved. 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 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. */ 3 * found in the LICENSE file. */
4 4
5 /* Set the global 'box-sizing' state to 'border-box'. 5 /* Set the global 'box-sizing' state to 'border-box'.
6 * *::after and *::before used to select pseudo-elements not selectable by *. */ 6 * *::after and *::before used to select pseudo-elements not selectable by *. */
7 7
8 *, 8 *,
9 *::after, 9 *::after,
10 *::before { 10 *::before {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 sub { 58 sub {
59 bottom: -0.25em; 59 bottom: -0.25em;
60 } 60 }
61 61
62 /* Remove most spacing between table cells. */ 62 /* Remove most spacing between table cells. */
63 63
64 table { 64 table {
65 border-collapse: collapse; 65 border-collapse: collapse;
66 border-spacing: 0; 66 border-spacing: 0;
67 display: block;
68 overflow-x: auto;
67 } 69 }
68 70
69 td, 71 td,
70 th { 72 th {
71 padding: 0; 73 padding: 0.5rem;
72 } 74 }
73 75
74 /* Base typography. */ 76 /* Base typography. */
75 77
76 html { 78 html {
77 font-size: 14px; 79 font-size: 14px;
78 height: 100%; 80 height: 100%;
79 } 81 }
80 82
81 body { 83 body {
82 height: 100%; 84 height: 100%;
83 line-height: 1.4; 85 line-height: 1.714;
84 margin: 0px auto; 86 margin: 0px auto;
85 text-rendering: optimizeLegibility; 87 text-rendering: optimizeLegibility;
86 transition-property: color, background-color; 88 transition-property: color, background-color;
87 transition-duration: 0.5s; 89 transition-duration: 0.5s;
88 transition-timing-function: ease; 90 transition-timing-function: ease;
89 overflow-x: hidden; 91 overflow-x: hidden;
90 -webkit-overflow-scrolling: touch; 92 -webkit-overflow-scrolling: touch;
91 } 93 }
92 94
93 /* Classes for light, dark and sepia themes. 95 /* Classes for light, dark and sepia themes.
94 * Must agree with classes returned by useTheme() in dom_distiller_viewer.js 96 * Must agree with classes returned by useTheme() in dom_distiller_viewer.js
95 * and with CSS class constants in viewer.cc */ 97 * and with CSS class constants in viewer.cc */
96 98
97 .light { 99 .light {
98 color: #333; 100 color: #424242;
99 background-color: #FFF; 101 background-color: #FAFAFA;
100 } 102 }
101 103
102 .dark { 104 .dark {
103 color: #DDD; 105 color: #E0E0E0;
104 background-color: #000; 106 background-color: #212121;
105 } 107 }
106 108
107 .sepia { 109 .sepia {
108 color: #000; 110 color: #000;
109 background-color: rgb(203, 173, 141); 111 background-color: rgb(203, 173, 141);
110 } 112 }
111 113
114 .light a:link,
115 .sepia a:link {
116 color: #55F;
117 }
118
119 .dark a:link {
120 color: #88F;
121 }
122
123 .light a:visited,
124 .sepia a:visited {
125 color: #902290;
126 }
127
128 .dark a:visited {
129 color: #D872D8;
130 }
131
132 .light code,
133 .light pre {
134 background-color: #EEE;
135 border-color: #AAA;
136 }
137
138 .sepia code,
139 .sepia pre {
140 background-color: rgb(217, 196, 175);
141 border-color: rgb(147, 125, 102);
142 }
143
144 .dark code,
145 .dark pre {
146 background-color: #333;
147 border-color: #555;
148 }
149
150 .light tbody tr:nth-child(odd) {
151 background-color: #EEE;
152 }
153
154 .light th, .light td {
155 border-left: 1px solid #AAA;
156 }
157
158 .sepia tbody tr:nth-child(odd) {
159 background-color: rgb(217, 196, 175);
160 }
161
162 .sepia th, .sepia td {
163 border-left: 1px solid rgb(147, 125, 102);
164 }
165
166 .dark tbody tr:nth-child(odd) {
167 background-color: #333;
168 }
169
170 .dark th, .dark td {
171 border-left: 1px solid #555;
172 }
173
174 /* #contentWrap is added to be more specific than the color theme rules */
175 #contentWrap th:first-child { border-left: none; }
176 #contentWrap td:first-child { border-left: none; }
177
178
179 /* Font settings */
180
112 .serif { 181 .serif {
113 font-family: serif; 182 font-family: serif;
114 } 183 }
115 184
116 .sans-serif { 185 .sans-serif {
117 font-family: 'Open Sans', sans-serif; 186 font-family: 'Roboto', sans-serif;
118 } 187 }
119 188
120 .monospace { 189 .monospace {
121 font-family: monospace; 190 font-family: monospace;
122 } 191 }
123 192
124 /* Define vertical rhythm (baseline grid of 4px). */ 193 /* Define vertical rhythm (baseline grid of 4px). */
125 194
126 blockquote, 195 blockquote,
127 caption, 196 caption,
128 code, 197 code,
129 dd, 198 dd,
130 dl, 199 dl,
131 fieldset, 200 fieldset,
132 figure, 201 figure,
133 form, 202 form,
134 hr, 203 hr,
135 legend, 204 legend,
136 ol, 205 ol,
137 p, 206 p,
138 pre, 207 pre,
139 q, 208 q,
140 table, 209 table,
141 td, 210 td,
142 th, 211 th,
143 ul { 212 ul {
144 margin-bottom: 1rem; 213 margin-bottom: 1.143rem;
145 } 214 }
146 215
216 h1,
147 h2, 217 h2,
148 h3, 218 h3,
149 h4, 219 h4,
150 h5, 220 h5,
151 h6 { 221 h6 {
152 line-height: 1.296; 222 line-height: 1.417;
153 margin-bottom: 0.444rem; 223 margin: 1em 0;
154 } 224 }
155 225
156 /* Content. */ 226 /* Content. */
157 227
158 /* Margins for Show Original link. */ 228 /* Margins for Show Original link. */
159 229
160 #closeReaderView { 230 .light #closeReaderView {
161 background-color: #FFFFFF;
162 border-top: 1px solid #E0E0E0; 231 border-top: 1px solid #E0E0E0;
163 color: #4285F4; 232 color: #4285F4;
233 }
234
235 .dark #closeReaderView {
236 border-top: 1px solid #555;
237 color: #3adaff;
238 }
239
240 .sepia #closeReaderView {
241 border-top: 1px solid rgb(147, 125, 102);
242 color: #55F;
243 }
244
245 #closeReaderView {
164 flex: 0 0 auto; 246 flex: 0 0 auto;
165 font-family: 'Roboto-Medium', 'Open Sans', sans-serif; 247 font-family: 'Roboto', sans-serif;
166 font-weight: 700; 248 font-weight: 700;
167 line-height: 14px; 249 line-height: 14px;
168 margin-top: 24px;
169 padding: 24px 16px; 250 padding: 24px 16px;
170 font-size: 14px; 251 font-size: 14px;
171 text-align: right; 252 text-align: right;
172 text-decoration: none; 253 text-decoration: none;
173 text-transform: uppercase; 254 text-transform: uppercase;
174 width: 100%; 255 width: 100%;
175 } 256 }
176 257
177 #content { 258 #content {
178 margin: 0.2rem 2.2%; 259 margin: 24px 16px 24px 16px;
179 } 260 }
180 261
181 #mainContent { 262 #mainContent {
182 flex: 1 1 auto; 263 flex: 1 1 auto;
183 margin: 0px auto; 264 margin: 0px auto;
184 max-width: 800px; 265 max-width: 35em;
185 width: 100%; 266 width: 100%;
186 } 267 }
187 268
188 #articleHeader { 269 #articleHeader {
189 background-color: rgb(73, 73, 73); 270 margin-top: 24px;
190 color: white;
191 min-height: 90px;
192 width: 100%; 271 width: 100%;
193 } 272 }
194 273
195 #titleCollapse {
196 display: block;
197 overflow: hidden;
198 }
199
200 #titleCollapse .verticalCenterOuter {
201 min-height: 90px;
202 }
203
204 #titleHolder { 274 #titleHolder {
205 padding: 10px 30px; 275 font-size: 1.714rem;
206 } 276 line-height: 1.417;
207 277 margin: 0 16px;
208 .verticalCenterOuter {
209 display: table;
210 height: 100%;
211 }
212
213 .verticalCenterInner {
214 display: table-cell;
215 vertical-align: middle;
216 }
217
218
219 /* Link colors for light, dark and sepia themes */
220
221 .light a:link,
222 .sepia a:link {
223 color: #55F;
224 }
225
226 .dark a:link {
227 color: #88F;
228 }
229
230 .light a:visited,
231 .sepia a:visited {
232 color: #902290;
233 }
234
235 .dark a:visited {
236 color: #D872D8;
237 } 278 }
238 279
239 blockquote { 280 blockquote {
240 border-left: 4px solid #eee; 281 border-left: 4px solid #888;
241 padding-left: 1em; 282 padding-left: 1em;
242 } 283 }
243 284
244 cite { 285 cite {
245 opacity: .54; 286 opacity: .8;
246 font-style: italic; 287 font-style: italic;
247 } 288 }
248 289
249 hr { 290 hr {
250 opacity: .5; 291 opacity: .5;
251 border-style: solid; 292 border-style: solid;
252 height: 1px 0 0 0; 293 height: 1px 0 0 0;
253 width: 75%; 294 width: 75%;
254 } 295 }
255 296
256 h1 {
257 font-size: 1.7rem;
258 line-height: 1.296;
259 margin-bottom: 0.444rem;
260 }
261 297
262 q { 298 q {
263 opacity: .8; 299 opacity: .8;
264 display:block; 300 display:block;
265 font-style: italic; 301 font-style: italic;
266 font-weight: 600; 302 font-weight: 600;
267 line-height: 1.444;
268 } 303 }
269 304
270 embed, 305 embed,
271 img, 306 img,
272 object, 307 object,
273 video { 308 video {
274 max-width: 100%; 309 max-width: 100%;
275 } 310 }
276 311
277 /* TODO(sunangel): make images zoomable. */ 312 /* TODO(sunangel): make images zoomable. */
278 313
279 img { 314 img {
280 display: block; 315 display: block;
281 height: auto; 316 height: auto;
282 margin: 0 auto 0.6rem auto; 317 margin: 0.6rem auto 0.4rem 0;
283 } 318 }
284 319
285 /* TODO(nyquist): set these classes directly in the dom distiller. */ 320 /* TODO(nyquist): set these classes directly in the dom distiller. */
286 321
287 embed+[class*='caption'], 322 embed+[class*='caption'],
288 figcaption, 323 figcaption,
289 img+[class*='caption'], 324 img+[class*='caption'],
290 object+[class*='caption'], 325 object+[class*='caption'],
291 video+[class*='caption'] { 326 video+[class*='caption'] {
292 opacity: .54; 327 opacity: .8;
293 display: table; 328 display: table;
294 font-style: italic; 329 margin-bottom: 1rem;
295 margin: 0 auto; 330 font-size: 0.857rem;
331 line-height: 1.667;
296 } 332 }
297 333
298 ol, 334 ol,
299 ul { 335 ul {
300 margin-left: 1.296rem; 336 margin-left: 1.296rem;
301 } 337 }
302 338
303 .light code, 339 code, pre {
304 .light pre, 340 border: 1px solid;
305 .sepia code,
306 .sepia pre {
307 background-color: #f8f8f8;
308 border: 1px solid #eee;
309 border-radius: 2px;
310 }
311
312 .dark code,
313 .dark pre {
314 background-color: #333;
315 border: 1px solid #555;
316 border-radius: 2px; 341 border-radius: 2px;
317 } 342 }
318 343
319 pre code { 344 pre code {
320 border: none; 345 border: none;
321 padding: 0;
322 } 346 }
323 347
324 pre { 348 pre {
325 line-height: 1.296; 349 line-height: 1.642;
326 overflow-x: scroll;
327 padding: .5em; 350 padding: .5em;
351 white-space: pre-wrap;
328 } 352 }
329 353
330 .hidden { 354 .hidden {
331 display: none; 355 display: none;
332 } 356 }
333 357
334 /* Footer feedback form. */ 358 /* Footer feedback form. */
335 #contentWrap { 359 #contentWrap {
336 display: flex; 360 display: flex;
337 flex-flow: column; 361 flex-flow: column;
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 border-color: rgb(250,36,36); 852 border-color: rgb(250,36,36);
829 } 853 }
830 854
831 #loader.red .circle.red .mask.first .mover { 855 #loader.red .circle.red .mask.first .mover {
832 background-color: rgb(33,89,189); 856 background-color: rgb(33,89,189);
833 } 857 }
834 858
835 #loader.red .circle.red .mask.second .mover { 859 #loader.red .circle.red .mask.second .mover {
836 background-color: rgb(250,36,36); 860 background-color: rgb(250,36,36);
837 } 861 }
OLDNEW
« no previous file with comments | « no previous file | components/dom_distiller/core/html/dom_distiller_viewer.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698