-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbigfoot.scss
619 lines (484 loc) · 25 KB
/
bigfoot.scss
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
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
// bigfoot - v2.1.1 - 2015.04.04
// ___ ___ ___ ___ ___ ___
// / /\ / /\ / /\ / /\ ___ / /\ / /\
// / /::\ / /::\ / /::\ / /::\ /__/\ / /:/_ / /::\
// / /:/\:\ / /:/\:\ / /:/\:\ / /:/\:\ \ \:\ / /:/ /\ / /:/\:\
// / /:/~/:// /:/ \:\ / /:/~/:// /:/ \:\ \ \:\ / /:/ /:/_ / /:/~/:/
// /__/:/ /://__/:/ \__\:\/__/:/ /://__/:/ \__\:\ ___ \__\:\/__/:/ /:/ /\/__/:/ /:/___
// \ \:\/:/ \ \:\ / /:/\ \:\/:/ \ \:\ / /://__/\ | |:|\ \:\/:/ /:/\ \:\/:::::/
// \ \::/ \ \:\ /:/ \ \::/ \ \:\ /:/ \ \:\| |:| \ \::/ /:/ \ \::/~~~~
// \ \:\ \ \:\/:/ \ \:\ \ \:\/:/ \ \:\__|:| \ \:\/:/ \ \:\
// \ \:\ \ \::/ \ \:\ \ \::/ \__\::::/ \ \::/ \ \:\
// \__\/ \__\/ \__\/ \__\/ ~~~~ \__\/ \__\/
//
// These are the key variables for styling the popover.
// Just set the variable to none if you don't want that styling.
// KEY VARIABLES
// =============================================================================
// STYLES
$popover-width: 22em !default; // Ideal width of the popover
$popover-max-width: 90% !default; // Best as a % to accommodate smaller viewports
$popover-max-height: 15em !default; // Maximum size of the content area
$popover-color-background: rgb(250, 250, 250) !default; // Color of the popover background
$popover-border-radius: 0.5em !default; // Radius of the corners of the popover
$popover-border: 1px solid rgb(195, 195, 195) !default; // Border of the popover/ tooltip
$popover-inactive-opacity: 0 !default; // Opacity of the popover when instantiated/ deactivating
$popover-active-opacity: 0.97 !default; // Opacity of the popover when active
$popover-box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3) !default; // Sets the box shadow under the popover/ tooltip
$popover-bottom-position: auto !default; // Sets the bottom position of the popover. Use only when setting positionPopover to false in the script
$popover-left-position: auto !default; // Sets the left position of the popover. Use only when setting positionPopover to false in the script
$popover-tooltip-size: 1.3em !default; // Sets the side lengths of the tooltip
$popover-scroll-indicator-width: 0.625em !default; // The width of the scroll indicator
$popover-scroll-indicator-aspect-ratio: (15/12) !default; // The ratio of the height over the width of the scroll indicator
$popover-scroll-indicator-opacity: 0.1 !default; // The active opacity of scroll indicators
$popover-initial-transform-state: scale(0.1) translateZ(0) !default; // The inital transform state for the popover
$popover-active-transform-state: scale(1) translateZ(0) !default; // The transform state for the popover once it is fully activated
// OPTIONAL ELEMENTS
$popover-include-tooltip: true !default; // Adds a tooltip pointing to the footnote button
$popover-include-scroll-indicator: true !default; // Adds an elipsis at the bottom of scrollable popovers
$popover-include-scrolly-fades: true !default; // Fades content in on scrollable popovers
$popover-scroll-indicator-icon: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTJweCIgaGVpZ2h0PSIxNXB4IiB2aWV3Qm94PSIwIDAgMTIgMTUiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pbllNaW4iPgogICAgPGcgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9IkFycm93IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxLjAwMDAwMCwgMS4wMDAwMDApIiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiPgogICAgICAgICAgICA8cGF0aCBkPSJNNSwwIEw1LDExLjUiIGlkPSJMaW5lIj48L3BhdGg+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik0wLjUsNy41IEw1LjAyNzY5Mjc5LDEyLjAyNzY5MjgiIGlkPSJMaW5lIj48L3BhdGg+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik00LjUsNy41IEw5LjAyNzY5Mjc5LDEyLjAyNzY5MjgiIGlkPSJMaW5lLTIiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDcuMDAwMDAwLCAxMC4wMDAwMDApIHNjYWxlKC0xLCAxKSB0cmFuc2xhdGUoLTcuMDAwMDAwLCAtMTAuMDAwMDAwKSAiPjwvcGF0aD4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPgo=") !default;
// OTHER VARIABLES
// =============================================================================
// POPOVER
$popover-margin-top: 0.1em !default;
$popover-padding-content-horizontal: 1.3em !default;
$popover-padding-content-top: 1.1em !default;
$popover-padding-content-bottom: 1.2em !default;
$popover-z-index: 10 !default; // Set the base so that it's above the other body children
$popover-initial-transform-origin: 50% 0 !default;
// POPOVER CONTENT WRAPPER
$popover-content-color-background: $popover-color-background !default;
$popover-content-border-radius: $popover-border-radius !default;
// OTHER POPOVER ELEMENTS
$popover-tooltip-background: $popover-color-background !default;
$popover-tooltip-radius: 0 !default;
$popover-scroll-indicator-bottom-position: 0.45em !default;
$popover-scrolly-fade-gradient-start-location: 50% !default;
$popover-scroll-indicator-padding: (($popover-padding-content-horizontal/2) - ($popover-scroll-indicator-width/2)) !default;
// TRANSITIONS
$popover-transition-default-duration: 0.25s !default;
$popover-scroll-indicator-transition-properties: opacity !default;
// Use none for areas you don't want to transition
$popover-transition-properties: opacity, transform !default; // no mixin to do proper prefixing of the transform, so I have to do it manually; see mixin below
$popover-scroll-indicator-transition-properties: opacity !default;
$popover-scroll-up-transition-delay: 0.4s !default; // Sets the delay for the transition of the scroll indicator when scrolling upwards
$popover-transition-default-timing-function: ease !default;
// ___ ___ ___
// _____ /__/\ ___ ___ / /\ /__/\
// / /::\ \ \:\ / /\ / /\ / /::\ \ \:\
// / /:/\:\ \ \:\ / /:/ / /:/ / /:/\:\ \ \:\
// / /:/~/::\ ___ \ \:\ / /:/ / /:/ / /:/ \:\ _____\__\:\
// /__/:/ /:/\:|/__/\ \__\:\ / /::\ / /::\ /__/:/ \__\:\/__/::::::::\
// \ \:\/:/~/:/\ \:\ / /://__/:/\:\ /__/:/\:\\ \:\ / /:/\ \:\~~\~~\/
// \ \::/ /:/ \ \:\ /:/ \__\/ \:\\__\/ \:\\ \:\ /:/ \ \:\ ~~~
// \ \:\/:/ \ \:\/:/ \ \:\ \ \:\\ \:\/:/ \ \:\
// \ \::/ \ \::/ \__\/ \__\/ \ \::/ \ \:\
// \__\/ \__\/ \__\/ \__\/
//
// These are the key variables for styling the button.
// Just set the variable to none if you don't want that styling.
// KEY VARIABLES
// =============================================================================
$button-height: 0.95em !default; // The total height of the button
$button-width: auto !default; // The total button width (applies only if $button-apply-dimensions is true)
$button-inner-circle-size: 0.25em !default; // Total height/width of the ellipsis circles
$button-border-radius: 0.3em !default; // Border radius on the button itself
$button-left-margin: 0.2em !default; // Margin between the button and the text to its left
$button-right-margin: 0.1em !default; // Margin between the button and the text to its right
$button-vertical-adjust: -0.1em !default; // Pushes the buttons along the vertical axis to align it with text as desired
$button-inner-circle-left-margin: 1*$button-inner-circle-size !default; // Space between the ellipsis circles
$button-color: rgb(110, 110, 110) !default; // Background color of the button
$button-hovered-color: $button-color !default; // Background color of the button when being hovered
$button-activating-color: $button-color !default; // Background color of the button when being clicked
$button-active-color: $button-color !default; // Background color of the button when active
$button-standard-opacity: 0.2 !default; // Opacity for when the button is just sittin' there
$button-hovered-opacity: 0.5 !default; // Opacity for when the button is being hovered over
$button-activating-opacity: $button-hovered-opacity !default; // Opacity for when the button is being clicked
$button-active-opacity: 1 !default; // Opacity for when the button is active
$button-active-style-delay: 0.1s !default; // Delay before applying .active styles; this can be used to match to the popover activation transition
$button-inner-circle-color: white !default; // Background color of the ellipsis circle
$button-inner-circle-border: none !default; // Border of the ellipsis circle
// OTHER VARIABLES
// =============================================================================
$button-total-padding: $button-height - $button-inner-circle-size !default;
$button-per-side-padding: 0.5*$button-total-padding !default;
$button-transition-properties: background-color !default;
// -----
// ___ ___ ___ ___
// /__/\ ___ /__/| ___ /__/\ / /\
// | |::\ / /\ | |:| / /\ \ \:\ / /:/_
// | |:|:\ / /:/ | |:| / /:/ \ \:\ / /:/ /\
// __|__|:|\:\ /__/::\ __|__|:| /__/::\ _____\__\:\ / /:/ /::\
// /__/::::| \:\\__\/\:\__/__/::::\____\__\/\:\__ /__/::::::::\/__/:/ /:/\:\
// \ \:\~~\__\/ \ \:\/\ ~\~~\::::/ \ \:\/\\ \:\~~\~~\/\ \:\/:/~/:/
// \ \:\ \__\::/ |~~|:|~~ \__\::/ \ \:\ ~~~ \ \::/ /:/
// \ \:\ /__/:/ | |:| /__/:/ \ \:\ \__\/ /:/
// \ \:\ \__\/ | |:| \__\/ \ \:\ /__/:/
// \__\/ |__|/ \__\/ \__\/
@mixin print-styles {
// These styles restore the original footnote numbers and texts when the page is printed
@media not print {
.footnote-print-only {
display: none !important;
}
}
@media print {
.bigfoot-footnote,
.bigfoot-footnote__button {
display: none !important;
}
}
}
// -----
// ___ ___ ___
// _____ /__/\ ___ ___ / /\ /__/\
// / /::\ \ \:\ / /\ / /\ / /::\ \ \:\
// / /:/\:\ \ \:\ / /:/ / /:/ / /:/\:\ \ \:\
// / /:/~/::\ ___ \ \:\ / /:/ / /:/ / /:/ \:\ _____\__\:\
// /__/:/ /:/\:|/__/\ \__\:\ / /::\ / /::\ /__/:/ \__\:\/__/::::::::\
// \ \:\/:/~/:/\ \:\ / /://__/:/\:\ /__/:/\:\\ \:\ / /:/\ \:\~~\~~\/
// \ \::/ /:/ \ \:\ /:/ \__\/ \:\\__\/ \:\\ \:\ /:/ \ \:\ ~~~
// \ \:\/:/ \ \:\/:/ \ \:\ \ \:\\ \:\/:/ \ \:\
// \ \::/ \ \::/ \__\/ \__\/ \ \::/ \ \:\
// \__\/ \__\/ \__\/ \__\/
//*
// The button that activates the footnote. By default, this will appear as a
// flat button that has an ellipse contained inside of it.
// @state .is-active - The associated popover has been activated and is visible.
// @since 2.1.0
// @author Chris Sauve
.bigfoot-footnote__button {
// POSITIONING
position: relative;
z-index: 5;
top: $button-vertical-adjust;
// DISPLAY AND SIZING
box-sizing: border-box;
-moz-box-sizing: border-box;;
display: inline-block;
padding: $button-per-side-padding;
margin: 0 $button-right-margin 0 $button-left-margin;
// BACKDROP
border: none;
border-radius: $button-border-radius;
cursor: pointer;
background-color: rgba($button-color, $button-standard-opacity);
backface-visibility: hidden;
// TEXT
font-size: 1rem;
line-height: 0;
vertical-align: middle;
text-decoration: none;
-webkit-font-smoothing: antialiased;
// TRANSITIONS
transition-property: $button-transition-properties;
transition-duration: $popover-transition-default-duration;
&:hover,
&:focus {
outline: none;
background-color: rgba($button-hovered-color, $button-hovered-opacity);
}
&:active {
background-color: rgba($button-activating-color, $button-activating-opacity);
}
&.is-active {
background-color: rgba($button-active-color, $button-active-opacity);
transition-delay: $button-active-style-delay;
}
// Clearfix
&:after {
content: '';
display: table;
clear: both;
}
}
// _____ ___ ___
// / /::\ / /\ ___ / /\
// / /:/\:\ / /::\ / /\ / /:/_
// / /:/ \:\ / /:/\:\ / /:/ / /:/ /\
// /__/:/ \__\:| / /:/ \:\ / /:/ / /:/ /::\
// \ \:\ / /://__/:/ \__\:\ / /::\ /__/:/ /:/\:\
// \ \:\ /:/ \ \:\ / /://__/:/\:\\ \:\/:/~/:/
// \ \:\/:/ \ \:\ /:/ \__\/ \:\\ \::/ /:/
// \ \::/ \ \:\/:/ \ \:\\__\/ /:/
// \__\/ \ \::/ \__\/ /__/:/
// \__\/ \__\/
//*
// Each of the three circles forming the ellipse within the button.
// @since 2.1.0
// @author Chris Sauve
.bigfoot-footnote__button__circle {
// DISPLAY AND SIZING
display: inline-block;
width: $button-inner-circle-size;
height: $button-inner-circle-size;
margin-right: $button-inner-circle-left-margin;
float: left;
// Gets rid of margin on the last circle
&:last-child { margin-right: 0; }
}
// ___ ___ ___ ___ ___
// / /\ / /\ /__/\ ___ / /\ ___ /__/\
// / /:/ / /::\ \ \:\ / /\ / /::\ / /\ \ \:\
// / /:/ / /:/\:\ \ \:\ / /:/ / /:/\:\ / /:/ \ \:\
// / /:/ ___ / /:/ \:\ _____\__\:\ / /:/ / /:/~/::\ /__/::\ _____\__\:\
// /__/:/ / /\/__/:/ \__\:\/__/::::::::\ / /::\ /__/:/ /:/\:\\__\/\:\__ /__/::::::::\
// \ \:\ / /:/\ \:\ / /:/\ \:\~~\~~\//__/:/\:\\ \:\/:/__\/ \ \:\/\\ \:\~~\~~\/
// \ \:\ /:/ \ \:\ /:/ \ \:\ ~~~ \__\/ \:\\ \::/ \__\::/ \ \:\ ~~~
// \ \:\/:/ \ \:\/:/ \ \:\ \ \:\\ \:\ /__/:/ \ \:\
// \ \::/ \ \::/ \ \:\ \__\/ \ \:\ \__\/ \ \:\
// \__\/ \__\/ \__\/ \__\/ \__\/
//*
// The container for the button and popover. This is required so that the popover
// is guaranteed to have a relatively-positioned container, and to help with the
// positioning calculation.
// @since 2.1.0
// @author Chris Sauve
.bigfoot-footnote__container {
display: inline-block;
position: relative;
text-indent: 0;
}
// ___ ___ ___
// / /\ / /\ ___ /__/\ ___
// / /::\ / /::\ / /\ \ \:\ / /\
// / /:/\:\ / /:/\:\ / /:/ \ \:\ / /:/
// / /:/~/:// /:/~/:/ /__/::\ _____\__\:\ / /:/
// /__/:/ /://__/:/ /:/___\__\/\:\__ /__/::::::::\ / /::\
// \ \:\/:/ \ \:\/:::::/ \ \:\/\\ \:\~~\~~\//__/:/\:\
// \ \::/ \ \::/~~~~ \__\::/ \ \:\ ~~~ \__\/ \:\
// \ \:\ \ \:\ /__/:/ \ \:\ \ \:\
// \ \:\ \ \:\ \__\/ \ \:\ \__\/
// \__\/ \__\/ \__\/
@include print-styles;
// -----
// ___ ___ ___ ___ ___ ___
// / /\ / /\ / /\ / /\ ___ / /\ / /\
// / /::\ / /::\ / /::\ / /::\ /__/\ / /:/_ / /::\
// / /:/\:\ / /:/\:\ / /:/\:\ / /:/\:\ \ \:\ / /:/ /\ / /:/\:\
// / /:/~/:// /:/ \:\ / /:/~/:// /:/ \:\ \ \:\ / /:/ /:/_ / /:/~/:/
// /__/:/ /://__/:/ \__\:\/__/:/ /://__/:/ \__\:\ ___ \__\:\/__/:/ /:/ /\/__/:/ /:/___
// \ \:\/:/ \ \:\ / /:/\ \:\/:/ \ \:\ / /://__/\ | |:|\ \:\/:/ /:/\ \:\/:::::/
// \ \::/ \ \:\ /:/ \ \::/ \ \:\ /:/ \ \:\| |:| \ \::/ /:/ \ \::/~~~~
// \ \:\ \ \:\/:/ \ \:\ \ \:\/:/ \ \:\__|:| \ \:\/:/ \ \:\
// \ \:\ \ \::/ \ \:\ \ \::/ \__\::::/ \ \::/ \ \:\
// \__\/ \__\/ \__\/ \__\/ ~~~~ \__\/ \__\/
//
//*
// The popover for the footnote. This popover will be, by default, be sized and positioned
// by the script. However, many of the sizes can be established in this stylesheet and
// will be respected by the script. `max-width` will limit the width of the popover
// relative to the viewport. `width` (on `bigfoot-footnote__wrapper`) will set the
// absolute max width. Max height can be set via a `max-height` property
// on `bigfoot-footnote__content`.
// By default, the popover has a light gray background, a shadow for some depth,
// rounded corners, and a tooltip pointing to the footnote button.
// @state .is-active - The popover has been activated and is visible.
// @state .is-positioned-top - The popover is above the button.
// @state .is-positioned-bottom - The popover is below the button.
// @state .is-scrollable - The popover content is greater than the popover height.
// @state .is-fully-scrolled - The popover content is scrolled to the bottom.
// @since 2.1.0
// @author Chris Sauve
.bigfoot-footnote {
// POSITIONING
position: absolute;
z-index: $popover-z-index;
top: 0; left: 0;
// DISPLAY AND SIZING
display: inline-block;
box-sizing: border-box;
// Height is set in .footnote-content-wrapper
max-width: $popover-max-width;
// 1.414213... is to get the diagonal height of the tooltip using pythagorus, yo.
margin: ((1.4142135624 * $popover-tooltip-size / 2) + $button-height + $popover-margin-top) 0;
// fits the popover to the contents
// BACKDROP
background: $popover-color-background;
opacity: $popover-inactive-opacity;
border-radius: $popover-border-radius;
border: $popover-border;
box-shadow: $popover-box-shadow;
// TEXT
line-height: 0;
// TRANSITIONS
transition-property: $popover-transition-properties;
transition-duration: $popover-transition-default-duration;
transition-timing-function: $popover-transition-default-timing-function;
// TRANSFORMS
transform: $popover-initial-transform-state;
transform-origin: $popover-initial-transform-origin;
&.is-positioned-top {
top: auto;
bottom: 0;
}
&.is-active {
transform: $popover-active-transform-state;
opacity: $popover-active-opacity;
}
&.is-bottom-fixed {
// POSITIONING
position: fixed;
bottom: 0; top: auto;
left: 0; right: auto;
transform: translateY(100%);
// DISPLAY AND SIZING
width: 100%;
margin: 0;
// BACKDROP
border-radius: 0;
opacity: 1;
border-width: 1px 0 0;
// TRANSITIONS
transition: transform 0.3s ease;
&.is-active {
transform: translateY(0);
}
.bigfoot-footnote__wrapper {
margin: 0 0 0 50%;
transform: translateX(-50%);
max-width: 100%;
}
.bigfoot-footnote__wrapper,
.bigfoot-footnote__content {
border-radius: 0;
}
.bigfoot-footnote__tooltip {
display: none;
}
}
&.is-scrollable {
// A scrollable indicator in the left margin of the popover.
&:after {
// CONTENT
content: '';
// POSITIONING
position: absolute;
bottom: $popover-scroll-indicator-padding;
left: $popover-scroll-indicator-padding;
z-index: ($popover-z-index + 4);
// DISPLAY AND SIZING
display: block;
height: ($popover-scroll-indicator-width*$popover-scroll-indicator-aspect-ratio);
width: $popover-scroll-indicator-width;
// BACKDROP
background-image: $popover-scroll-indicator-icon;
background-size: cover;
opacity: $popover-scroll-indicator-opacity;
transition-properties: $popover-scroll-indicator-transition-properties;
transition-duration: $popover-transition-default-duration;
transition-timing-function: $popover-transition-default-timing-function;
}
.bigfoot-footnote__wrapper {
&:before,
&:after {
content: '';
position: absolute;
width: 100%;
// Above the content
z-index: ($popover-z-index + 2);
left: 0;
}
&:before {
top: -1px;
height: $popover-padding-content-top;
border-radius: $popover-border-radius $popover-border-radius 0 0;
background-image: linear-gradient(to bottom, $popover-color-background $popover-scrolly-fade-gradient-start-location, transparentize($popover-color-background, 1) 100%);
}
&:after {
bottom: -1px;
height: $popover-padding-content-bottom;
border-radius: 0 0 $popover-border-radius $popover-border-radius;
background-image: linear-gradient(to top, $popover-color-background $popover-scrolly-fade-gradient-start-location, transparentize($popover-color-background, 1) 100%);
}
}
::-webkit-scrollbar { display: none; }
}
&.is-fully-scrolled {
&:after,
&:before {
opacity: 0;
transition-delay: 0;
}
}
}
//*
// Wraps around the footnote content. This is necessary in order to have an element
// above the tooltip and that can provide top and bottom indicators that there is
// additional content on scrollable popovers.
// @since 2.1.0
// @author Chris Sauve
.bigfoot-footnote__wrapper {
// POSITIONING
position: relative;
// Above the outer tooltip, below the inner tooltip
z-index: ($popover-z-index + 4);
// DISPLAY AND SIZING
width: $popover-width;
display: inline-block;
box-sizing: inherit;
overflow: hidden;
margin: 0;
// BACKDROP
background-color: $popover-color-background;
border-radius: $popover-border-radius;
// TEXT
line-height: 0;
}
//*
// Contains the actual footnote content. There is very little prescription here
// on the footnote content itself, except for removing and top margin on the first
// element and bottom margin on the last child.
// @since 2.1.0
// @author Chris Sauve
.bigfoot-footnote__content {
// POSITIONING
position: relative;
z-index: ($popover-z-index - 2); // Below fading bars
// DISPLAY AND SIZING
display: inline-block;
max-height: $popover-max-height;
padding: $popover-padding-content-top $popover-padding-content-horizontal $popover-padding-content-bottom;
box-sizing: inherit;
overflow: auto;
-webkit-overflow-scrolling: touch;
// BACKDROP
background: $popover-content-color-background;
border-radius: $popover-content-border-radius;
// TEXT
-webkit-font-smoothing: subpixel-antialiased;
line-height: normal;
// INTERIOR ELEMENTS
img { max-width: 100%; }
*:last-child { margin-bottom: 0 !important; }
*:first-child { margin-top: 0 !important; }
}
//*
// A triangular shape pointing towards the footnote button.
// @since 2.1.0
// @author Chris Sauve
.bigfoot-footnote__tooltip {
// POSITIONING
position: absolute;
// Above the footnote-main-wrapper and the outer tooltip
z-index: ($popover-z-index + 2);
// DISPLAY AND SIZING
box-sizing: border-box;
margin-left: (-0.5 * $popover-tooltip-size);
// Smaller by one border-width's worth
width: $popover-tooltip-size;
height: $popover-tooltip-size;
transform: rotate(45deg);
// BACKDROP
background: $popover-tooltip-background;
border: $popover-border;
box-shadow: $popover-box-shadow;
border-top-left-radius: $popover-tooltip-radius;
.is-positioned-bottom & {
top: (-0.5 * $popover-tooltip-size);
}
.is-positioned-top & {
bottom: (-0.5 * $popover-tooltip-size);
}
}