-
Notifications
You must be signed in to change notification settings - Fork 42
/
styles.css
471 lines (380 loc) · 9.85 KB
/
styles.css
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
64
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
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
201
202
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
228
229
230
231
232
233
234
235
236
237
238
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
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
@import '@elifesciences/pattern-library';
@import '../../extensions/cite-author-year/styles.css';
@import '../../extensions/person/styles.css';
@import '../../extensions/math/styles.css';
@import 'staticCustomProperties.css';
@import 'stencilaComponents.css';
/* @extend-ing eLife's CSS may not take into account the cascade of styles
* applied to an element upstream of the extended style. Add @mixins here for such styles
* that apply to more than one element, that would otherwise be missed. */
@define-mixin inline-list {
list-style: none;
padding: 0;
}
@define-mixin visuallyhidden {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
user-select: none;
}
@custom-media --medium-viewport (min-width: 45.625em);
@custom-media --medium-viewport-max (max-width: 45.625em);
:--root {
@extend .wrapper;
@extend .content-container;
@extend .grid__item;
float: none;
padding-left: 7%;
padding-right: 7%;
@extend .grid-column;
--main-title-font-size: var(--TEXT-SIZE-MAIN-TITLE--NARROWER-VIEWPORTS);
--main-title-block-height: var(--BLOCK-HEIGHT-MAIN-TITLE--NARROWER-VIEWPORTS);
--download-icon-block-size: var(
--BLOCK-SIZE-DOWNLOAD-ICON-PX--NARROWER-VIEWPORTS
);
}
@media only screen and (--medium-viewport) {
:--root {
padding-left: 3%;
padding-right: 3%;
--main-title-font-size: var(--TEXT-SIZE-MAIN-TITLE--WIDER-VIEWPORTS);
--main-title-block-height: var(--BLOCK-HEIGHT-MAIN-TITLE--WIDER-VIEWPORTS);
--download-icon-block-size: var(
--BLOCK-SIZE-DOWNLOAD-ICON-PX--WIDER-VIEWPORTS
);
}
}
:--Article {
position: relative;
padding-top: 2rem;
.content-header__icons {
left: 0;
}
.content-header__icon {
background-repeat: no-repeat;
background-position: center bottom;
display: block;
width: 17px;
height: 22px;
}
.content-header__icon--cc,
.content-header__icon--cc:hover {
background-image: url('~/node_modules/@elifesciences/pattern-library/source/assets/img/icons/cc.svg');
}
.content-header__icon--oa,
.content-header__icon--oa:hover {
background-image: url('~/node_modules/@elifesciences/pattern-library/source/assets/img/icons/oa.svg');
}
& :--authors {
@extend .content-header__author_list;
margin-bottom: 0;
:--Person {
@extend .content-header__author_list_item;
display: inline;
&::after {
content: ', ';
}
&:last-child {
&::after {
content: '';
}
}
:--emails {
padding-left: 4px;
}
:--email {
span {
display: none;
}
&::after {
content: url('~/node_modules/@elifesciences/pattern-library/source/assets/img/icons/corresponding-author@1x.png');
}
}
}
:--Organization {
@extend .content-header__author_list_item;
font-size: var(--TEXT-SIZE-MEDIUM-REM);
:--name::after {
content: ', ';
}
&:last-child {
:--name::after {
content: '';
}
}
:--email {
span {
display: none;
}
&::after {
content: url('~/node_modules/@elifesciences/pattern-library/source/assets/img/icons/corresponding-author@1x.png');
}
}
}
/* Hide until requirement is established */
:--affiliations {
display: none;
}
}
& :--affiliations {
@mixin inline-list;
@extend .content-header__institution_list;
margin-bottom: var(--BASELINE-MEASURE-REM);
:--Organization {
@extend .content-header__institution_list_item;
display: inline;
font-size: var(--TEXT-SIZE-MEDIUM-REM);
:--name,
:--address {
}
& :--parentOrganization::before {
content: ', ';
}
& :--address::after {
content: '; ';
}
&:last-child :--address::after {
content: '';
}
& :--address span::before {
content: ', ';
}
:--addressCountry::before {
content: ' ';
}
}
}
/* Hide article metadata */
& > [data-itemprop='about'],
& > [data-itemprop='genre'],
& > :--keywords,
& > :--identifiers {
display: none;
}
/* Hide Collaborative group/organization author emails/list */
& > :--authors :--Organization :--email,
& > :--authors :--Organization :--members {
display: none;
}
& :--references {
font-family: 'Noto Sans', Arial, Helvetica, sans-serif;
ol {
list-style-type: none;
padding: 0;
}
:--reference {
font-family: 'Noto Sans', Arial, Helvetica, sans-serif;
font-size: var(--TEXT-SIZE-DEFAULT-REM);
margin-right: 2.5rem;
margin-bottom: 0.75rem;
:--title {
display: inline;
font-size: var(--TEXT-SIZE-DEFAULT-REM);
font-weight: bold;
&::before {
content: ' ';
}
}
:--author {
font-size: var(--TEXT-SIZE-DEFAULT-REM);
line-height: 27px;
}
:--authors {
display: inline;
}
:--datePublished {
display: inline;
&::before {
content: ' (';
}
&::after {
content: ')';
}
}
:--isPartOf :--name {
font-style: italic;
&::before {
content: ' ';
}
&::after {
content: ' ';
white-space: pre;
}
}
:--volumeNumber {
font-weight: bold;
&::after {
content: ':';
}
}
:--pageEnd::before {
content: '-';
}
}
}
& .content-header {
display: flex;
flex-direction: row-reverse;
margin-bottom: calc(var(--BASELINE-MEASURE-REM) / 2);
& > .download-link {
flex: 0 0 var(--download-icon-block-size);
height: var(--download-icon-block-size);
background: url('~/node_modules/@elifesciences/pattern-library/source/assets/img/icons/download.svg')
transparent no-repeat;
@media only screen and (--medium-viewport) {
background-image: url('~/node_modules/@elifesciences/pattern-library/source/assets/img/icons/download-full.svg');
}
& > .download-link-text {
@mixin visuallyhidden;
}
}
}
& .downloads {
--link-color: var(--COLOR-TEXT);
.downloads--link {
margin-top: 6px;
font-family: 'Noto Sans', Arial, Helvetica, sans-serif;
a {
color: var(--COLOR-PRIMARY);
font-size: var(--TEXT-SIZE-MEDIUM-REM);
font-weight: normal;
line-height: 1.5rem;
border-bottom: 0;
}
}
ul {
margin-top: 0;
margin-bottom: var(--BASELINE-MEASURE-REM);
li {
font-size: var(--TEXT-SIZE-DEFAULT-REM);
a {
background-color: var(--COLOR-TEXT-UI-BACKGROUND);
color: var(--link-color);
border-bottom: 1px dotted var(--COLOR-TEXT);
text-decoration: none;
&:hover {
--link-color: var(--COLOR-PRIMARY);
border-bottom-color: var(--COLOR-PRIMARY);
}
}
}
}
}
& .social-sharers {
height: 20px;
text-align: center;
/* Added 4px because height of social sharer link is 20px instead of 24px; */
margin-bottom: calc(var(--BASELINE-MEASURE-REM) + 4px);
& .social-sharer-link {
display: inline-block;
margin: 0 8px;
padding: 3px 0 1px;
width: 24px;
height: 24px;
text-align: center;
border-radius: 3px;
background-color: rgb(33 33 33);
fill: var(--COLOR-TEXT-UI-BACKGROUND);
stroke: none; /* stylelint-disable-line scale-unlimited/declaration-strict-value */
transition: 25ms ease-in-out;
&:hover {
background-color: var(--COLOR-PRIMARY);
}
& > svg {
width: 16px;
height: 16px;
}
}
}
/* Target the 'content header' at the top of the article */
&:not(:--reference) {
& > :--title,
& > :--authors,
& > :--affiliations,
& > :--datePublished {
text-align: center;
}
& > :--title {
font-size: calc(var(--main-title-font-size) * 1rem);
line-height: calc(
var(--main-title-block-height) / var(--main-title-font-size)
);
margin-bottom: var(--BASELINE-MEASURE-REM);
}
& > :--datePublished {
color: var(--COLOR-TEXT-SECONDARY);
display: block;
font-family: 'Noto Sans', Arial, Helvetica, sans-serif;
font-size: var(--TEXT-SIZE-SMALL-REM);
letter-spacing: var(--LETTER-SPACING);
line-height: calc(var(--BASELINE-MEASURE) / var(--TEXT-SIZE-SMALL));
text-align: center;
text-transform: capitalize;
}
}
:--Figure {
display: flex;
flex: 0 0 auto;
flex-direction: column;
margin: 1em 0;
:--label {
order: 1;
}
:--content {
order: 2;
}
:--caption {
order: 3;
}
img {
outline: 1px solid #e0e0e0;
padding: 0.75rem;
}
:--Heading {
font-size: var(--TEXT-SIZE-SMALL-MEDIUM-REM);
line-height: 1.84615;
padding-bottom: 0;
}
:--Paragraph {
font-size: var(--TEXT-SIZE-SMALL-MEDIUM-REM);
line-height: 1.84615;
}
}
:--label {
display: block;
font-size: var(--TEXT-SIZE-MEDIUM-REM);
font-weight: bold;
line-height: 1.71429;
padding: 0.75rem 0;
&:empty {
display: none;
}
}
:--caption {
padding-left: 0.75rem;
padding-right: 0.75rem;
}
}
:--Collection {
padding-left: 0;
li {
list-style-type: none;
}
}
/* Visually hide 'content header' affiliations at narrower viewports, maintaining vertical whitespace */
@media screen and (--medium-viewport-max) {
/* Target the 'content header' at the top of the article */
:--Article:not(:--reference) {
& > :--authors {
margin-bottom: var(--BASELINE-MEASURE-REM);
}
& :--affiliations {
@mixin visuallyhidden;
}
}
}