Repository navigation
Expand file tree
/
Copy pathstyles.css
More file actions
1294 lines (1136 loc) · 36.7 KB
/
Copy pathstyles.css
File metadata and controls
1294 lines (1136 loc) · 36.7 KB
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
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* ============================ */
/* == 🚩 Pixel Banner Styles == */
/* ============================ */
@keyframes pixel-banner-spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
@keyframes pixel-banner-fade-in {
0% { opacity: 0; }
100% { opacity: 1; }
}
.pixel-banner-icon-fade-in {
animation: pixel-banner-fade-in 0.4s ease-in-out;
}
@keyframes pixel-banner-icon-fade-in {
from { opacity: 0; }
to { opacity: 0.35; }
}
@keyframes pixel-banner-twinkle {
0% { opacity: 1; transform: scale(1) rotate(0deg); }
20% { opacity: 0.8; transform: scale(1.3) rotate(10deg); }
40% { opacity: 1; transform: scale(1.1) rotate(5deg); }
60% { opacity: 0.8; transform: scale(1.3) rotate(-5deg); }
80% { opacity: 1; transform: scale(1.1) rotate(-10deg); }
100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes pixel-banner-radial-pulse {
0% { box-shadow: 0 0; }
60% { box-shadow: 0 0 hsla(var(--accent-h), var(--accent-s), var(--accent-l), 1); }
90% { box-shadow: 0 0 0 4px hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.5); }
100% { box-shadow: 0 0 0 2px hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.2); }
}
@keyframes pixel-banner-scale-up-down {
0% { transform: scale(1); }
50% { transform: scale(1.1); }
100% { transform: scale(1); }
}
.pixel-banner-image {
position: absolute;
top: 0;
left: var(--pixel-banner-banner-gap, 0);
right: var(--pixel-banner-banner-gap, 0);
background-size: cover;
background-position: var(--pixel-banner-x-position, 50%) var(--pixel-banner-y-position, 50%);
overflow: hidden;
mask-image: linear-gradient(to bottom, black calc(100% + var(--pixel-banner-fade, -75%)), transparent);
-webkit-mask-image: linear-gradient(to bottom, black calc(100% + var(--pixel-banner-fade, -75%)), transparent);
height: var(--pixel-banner-height, 350px);
border-radius: var(--pixel-banner-radius, 17px);
pointer-events: none;
animation: pixel-banner-fade-in var(--pixel-banner-fade-in-animation-duration, 300ms) ease-in-out;
will-change: opacity;
transform: translateZ(0);
background-repeat: no-repeat;
z-index: -1;
width: unset;
max-width: var(--pixel-banner-max-width, unset);
margin: var(--pixel-banner-alignment, 0 auto);
/* add transition to banner image background position */
transition: background-position 0.5s ease;
}
/* the text column width for banner-max-width: readable and Match readable line length (issue #267). */
/* The variable only exists while Obsidian's Readable line length is on, so readable falls back to */
/* none (full width) otherwise. It inherits, reaching the banner and its --pixel-banner-max-width */
.markdown-preview-view.is-readable-line-width,
.markdown-source-view.is-readable-line-width {
--pixel-banner-readable-width: var(--file-line-width);
}
/* jump to a new focal point when Animate banner position changes is off (issue #226) */
.pixel-banner-image.pixel-banner-no-position-transition {
transition: none;
}
/* never slide when the system asks for reduced motion (issue #226) */
@media (prefers-reduced-motion: reduce) {
.pixel-banner-image {
transition: none;
}
}
.pixel-banner-video {
object-fit: cover;
object-position: var(--pixel-banner-x-position, 50%) var(--pixel-banner-y-position, 50%) !important;
}
/* only embeds that show a banner: the variable also sits on the host note's view */
/* and inherits into every embed, padding block and heading embeds (issue #331) */
.internal-embed.pixel-banner > .markdown-embed-content > .markdown-preview-view,
.internal-embed.pixel-banner-icon-only > .markdown-embed-content > .markdown-preview-view {
min-height: var(--pixel-banner-embed-min-height, unset);
}
.markdown-embed-content .pixel-banner-image {
position: absolute;
left: 0;
z-index: unset !important;
}
.markdown-embed-content .pixel-banner-image ~ div {
position: relative;
z-index: 1;
}
/* collapse scrollbar gutter when no scrollbar is present */
.pixel-banner .markdown-preview-view,
.pixel-banner .markdown-source-view .cm-scroller {
scrollbar-gutter: auto !important;
}
/* Apply title color to both reading and editing mode */
.pixel-banner div.inline-title,
.pixel-banner .markdown-source-view div.inline-title {
color: var(--pixel-banner-title-color, var(--inline-title-color));
}
/* fix for banner image overlapping with note content */
/* isolate the banner image from the note content */
.view-content.pixel-banner {
position: relative;
isolation: isolate;
}
/* the banner sits at z-index -1, under the layers between it and .view-content. */
/* Obsidian leaves them transparent, but some themes paint them with */
/* --background-primary, which hides the banner (issue #311). Keep them clear in */
/* banner notes; .view-content still paints the note background below the banner. */
.view-content.pixel-banner > .markdown-source-view,
.view-content.pixel-banner > .markdown-source-view > .cm-editor,
.view-content.pixel-banner > .markdown-source-view > .cm-editor > .cm-scroller,
.view-content.pixel-banner > .markdown-reading-view,
.view-content.pixel-banner > .markdown-reading-view > .markdown-preview-view {
background-color: transparent;
}
/* phone: Obsidian pads the scroller by --view-top-spacing-markdown so content */
/* clears the floating view header, but absolutely positioned banner pieces */
/* ignore that padding and end up under the header (issue #335). Shift them */
/* by the same amount; `translate` composes with any transform or inline top. */
.is-phone .mod-root .workspace-leaf-content .view-content .markdown-reading-view > .markdown-preview-view > .markdown-preview-sizer > :is(.pixel-banner-image, .banner-icon-overlay, .select-image-icon, .pin-icon, .refresh-icon, .view-image-icon),
.is-phone .mod-root .workspace-leaf-content .view-content .markdown-source-view > .cm-editor > .cm-scroller > .cm-sizer > :is(.pixel-banner-image, .banner-icon-overlay, .select-image-icon, .pin-icon, .refresh-icon, .view-image-icon) {
translate: 0 var(--view-top-spacing-markdown, 0px);
}
/* icon-only header (issues #322, #238): a note with an icon and no banner keeps */
/* its content below the icon. Child combinators so embedded notes don't match. */
.view-content.pixel-banner-icon-only > .markdown-reading-view > .markdown-preview-view > .markdown-preview-sizer,
.view-content.pixel-banner-icon-only > .markdown-source-view > .cm-editor > .cm-scroller > .cm-sizer {
padding-top: var(--pixel-banner-content-start);
}
/* ----------------------------------------------- */
/* -- Specific styles for hover popover banners -- */
/* ----------------------------------------------- */
.popover.hover-popover {
min-height: 200px;
}
/* no forced background-repeat: it overrode the Image Repeat setting and tiled */
/* "contain" banners in hover popovers and Hover Editor (issue #312) */
.popover.hover-popover .pixel-banner-image {
min-height: 100px;
}
.pixel-banner-image + .markdown-preview-sizer.markdown-preview-section {
margin-top: 100px;
}
.hover-popover .markdown-preview-view.pixel-banner {
position: relative;
isolation: isolate;
}
.hover-popover .pixel-banner-image {
position: absolute;
top: 0;
left: 0;
right: 0;
z-index: 0;
width: 100%;
max-width: 100% !important;
border-radius: var(--pixel-banner-radius, 17px);
}
.hover-popover .markdown-preview-view .markdown-preview-sizer {
position: relative;
z-index: 1;
}
.hover-popover .markdown-preview-view.pixel-banner .markdown-preview-sizer {
padding-top: var(--pixel-banner-content-start, 150px) !important;
}
/* ----------------------------------------------- */
.cm-sizer .metadata-container,
.markdown-preview-sizer .metadata-container {
z-index: 1;
}
/* fix overflow issue with embedded notes */
.internal-embed:not(.image-embed),
.internal-embed:not(.image-embed) > .markdown-embed-content > .markdown-preview-view {
overflow: hidden;
}
/* hide frontmatter fields in reading mode */
.markdown-preview-view .pixel-banner-hidden-field {
display: none !important;
}
/* Add specific targeting for properties view */
.metadata-property.pixel-banner-hidden-field {
display: none !important;
}
/* ----------------------------------------------------- */
/* -- content start (push frontmatter container down) -- */
/* *** NOTE: this is now handled in bannerManager.js *** */
/* *** for faster rendering! *** */
/* ----------------------------------------------------- */
/* -- fix for embedded notes -- */
.internal-embed > .markdown-embed-content .cm-sizer:first-of-type,
.internal-embed > .markdown-embed-content .markdown-preview-sizer:first-of-type {
padding-top: unset !important;
}
.internal-embed > .markdown-embed-content .cm-sizer:first-of-type > .pixel-banner-image ~ .markdown-preview-pusher,
.internal-embed > .markdown-embed-content .markdown-preview-sizer:first-of-type > .pixel-banner-image ~ .markdown-preview-pusher,
.internal-embed.pixel-banner-icon-only > .markdown-embed-content .cm-sizer:first-of-type > .banner-icon-overlay ~ .markdown-preview-pusher,
.internal-embed.pixel-banner-icon-only > .markdown-embed-content .markdown-preview-sizer:first-of-type > .banner-icon-overlay ~ .markdown-preview-pusher {
height: var(--pixel-banner-content-start, 0.1px) !important;
}
/* -------------------------- */
/* -- Settings Page Styles -- */
/* -------------------------- */
.vertical-tab-content-container {
display: flex;
flex-direction: column;
}
.pixel-banner-settings {
display: flex;
flex-direction: column;
overflow: hidden;
padding: 20px;
}
.pixel-banner-header {
text-align: center;
margin-bottom: 30px;
background-color: var(--background-secondary);
padding: 20px;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.pixel-banner-header h2 {
margin-bottom: 10px;
color: var(--text-accent);
}
/* Readable-width cap belongs here, not on .pixel-banner-settings:
the Obsidian 1.13+ settings window centers the settings pane with
"padding-inline: max(32px, (100% - 700px) / 2)" on .vertical-tab-content,
which is the same element .pixel-banner-settings is applied to - capping the
pane there squeezed the whole settings UI into a few dozen pixels on wide
windows (see #337). */
.pixel-banner-main-content {
flex: 1;
display: flex;
flex-direction: column;
gap: 10px;
overflow: hidden;
width: 100%;
max-width: 800px;
margin-inline: auto;
}
.pixel-banner-settings-tabs {
flex-direction: row;
flex: 0 auto;
}
.pixel-banner-settings-tab-content-container {
display: flex;
flex-direction: column;
flex: 1;
overflow: hidden;
}
.pixel-banner-settings-tab-content-container > .tab-content {
overflow: auto;
padding-right: 10px;
}
.tab-content[data-tab="Folder Images"] {
padding-bottom: 10px;
}
.tab-content[data-tab="Folder Images"] .add-folder-image-setting {
position: absolute;
bottom: 0;
right: 64px;
padding-right: 16px;
background: var(--color-secondary);
}
.tab-content[data-tab="Folder Images"] .add-folder-image-setting button {
color: var(--text-on-accent);
border-bottom: 2px solid var(--text-accent-hover);
background: var(--color-accent);
}
.pixel-banner-section {
background-color: var(--background-secondary);
border-radius: 10px;
padding: 20px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.pixel-banner-section h3 {
margin-top: 0;
margin-bottom: 15px;
color: var(--text-accent-hover);
font-size: 1.2em;
}
.pixel-banner-section ol {
padding-left: 20px;
margin-bottom: 15px;
}
.pixel-banner-section pre {
background-color: var(--background-primary);
border-radius: 5px;
padding: 10px;
margin-top: 10px;
overflow-x: auto;
}
.pixel-banner-footer {
margin-top: 30px;
text-align: center;
font-style: italic;
color: var(--text-muted);
}
.pixel-banner-settings .setting-item {
border-top: none;
padding-top: 10px;
padding-bottom: 10px;
}
.pixel-banner-settings .setting-item.full-width-control,
.pixel-banner-settings .setting-item.full-width-control > .setting-item-control {
width: 100%;
}
.pixel-banner-settings .setting-item-control {
justify-content: flex-end;
}
.setting-item.folder-image-setting {
position: relative;
flex-wrap: wrap;
justify-content: flex-start;
border: 1px solid var(--slider-track-background);
border-radius: 5px;
padding: 20px;
margin: 20px 0;
/* background-color: var(--background-secondary); */
}
.setting-item.folder-image-setting .folder-image-delete-container {
position: absolute;
top: 10px;
right: 0;
}
.pixel-banner-setting--delete-button {
border: 1px solid var(--color-accent) !important;
}
.pixel-banner-setting--delete-button:hover {
background: var(--color-accent) !important;
color: var(--text-on-accent) !important;
}
.setting-item.folder-image-setting > .folder-input-container,
.setting-item.folder-image-setting > .display-and-repeat-container {
display: flex;
width: 100%;
}
.setting-item.folder-image-setting > .setting-item-control {
justify-content: flex-start;
}
/* setting item for api key */
.pixel-banner-settings .setting-item[data-id="apiKey"] .setting-item-control {
width: 100%;
}
/* setting item for default keywords */
.pixel-banner-settings .setting-item[data-id="defaultKeywords"] .setting-item-control {
width: 100%;
}
.pixel-banner-settings input[type="text"],
.pixel-banner-settings select {
background-color: var(--background-primary);
border: 1px solid var(--background-modifier-border);
border-radius: 5px;
padding: 5px 30px 5px 10px;
}
.pixel-banner-settings .dropdown {
background-color: var(--background-primary);
border: 1px solid var(--background-modifier-border);
border-radius: 5px;
}
.pixel-banner-settings .slider-container {
display: flex;
align-items: center;
}
.pixel-banner-settings.slider-value {
min-width: 30px;
text-align: right;
}
.pixel-banner-settings .setting-item-description {
color: var(--text-muted);
}
.pixel-banner-settings .pixel-banner-example-values {
color: var(--code-comment, var(--text-muted, inherit));
}
.pixel-banner-settings-tabs {
display: flex;
flex-wrap: wrap;
}
.pixel-banner-settings-tab {
margin: 0 10px 10px 0;
padding: 10px 20px;
border: none;
background: none;
cursor: pointer;
font-size: 13px;
text-transform: uppercase;
color: var(--text-muted);
transition: color 0.3s ease;
}
.pixel-banner-settings-tab:hover {
color: var(--text-normal);
}
.pixel-banner-settings-tab.active {
color: var(--text-on-accent);
border-bottom: 2px solid var(--text-accent-hover);
background: var(--color-accent);
}
.pixel-banner-settings-tab-content-container > .tab-content {
display: none;
}
.pixel-banner-settings-tab-content-container > .tab-content.active {
display: block;
}
.pixel-banner-settings-tabs .folder-image-setting .slider-container {
display: flex;
align-items: center;
}
.pixel-banner-settings-tabs .folder-image-setting .slider-value {
min-width: 30px;
text-align: right;
}
.folder-images-container .setting-item-name__label {
display: flex;
align-items: center;
}
.folder-images-container .full-width-control {
width: 100%;
}
.setting-item.folder-image-setting > div { min-height: 50px; }
.pixel-banner-settings .tab-content {
display: flex;
flex-direction: column;
}
.pixel-banner-settings .tab-callout {
position: relative;
display: flex;
flex-direction: column;
z-index: 1;
margin: 0 0 1em;
padding: .5em 1em;
background-color: var(--background-primary-alt);
border: 1px solid var(--background-modifier-border);
border-radius: 5px;
color: var(--text-accent-hover);
}
.pixel-banner-settings .setting-item {
position: relative;
z-index: 2;
}
.pixel-banner-settings input,
.pixel-banner-settings textarea,
.pixel-banner-settings select {
z-index: 3;
position: relative;
}
.metadata-container.pixel-banner-hidden-section {
display: none !important;
}
.pixel-banner-settings .setting-group {
border: 1px solid var(--background-modifier-border);
border-radius: 6px;
padding: 12px;
margin: 12px 0;
}
.pixel-banner-settings .setting-dependent {
margin-left: 24px;
position: relative;
}
.pixel-banner-settings .setting-dependent::before {
content: "";
position: absolute;
left: -24px;
top: 0;
bottom: 0;
width: 2px;
background-color: var(--background-modifier-border);
}
.pixel-banner-settings .setting-dependent.is-disabled {
opacity: 0.75;
}
/* a setting another one overrides, such as Banner Max Width while Match readable line length is on */
.pixel-banner-setting-inactive {
opacity: 0.5;
}
.pixel-banner-twinkle-animation {
animation: pixel-banner-twinkle 2s infinite;
display: inline-block;
}
.pixel-banner-image-container {
position: relative;
cursor: pointer;
border: 1px solid var(--background-modifier-border);
border-radius: 4px;
padding: 8px;
transition: all 0.2s ease;
}
.pixel-banner-image-container:hover {
transform: translateY(-2px);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
background-color: var(--background-modifier-hover);
}
.pixel-banner-image-container {
margin-top: 20px;
width: 100%;
}
.pixel-banner-loading {
display: flex;
justify-content: center;
align-items: center;
min-height: 100px;
}
.pixel-banner-error {
color: var(--text-accent);
text-align: center;
padding: 20px;
}
/* Loading Spinner */
.dot-pulse {
position: relative;
left: -9999px;
width: 8px;
height: 8px;
border-radius: 4px;
background-color: var(--text-accent);
color: var(--text-accent);
box-shadow: 9999px 0 0 -4px;
animation: pixel-banner-dot-pulse 1.5s infinite linear;
animation-delay: 0.25s;
}
.dot-pulse::before, .dot-pulse::after {
content: '';
display: inline-block;
position: absolute;
top: 0;
width: 8px;
height: 8px;
border-radius: 4px;
background-color: var(--text-accent);
color: var(--text-accent);
}
.dot-pulse::before {
box-shadow: 9984px 0 0 -4px;
animation: pixel-banner-dot-pulse-before 1.5s infinite linear;
animation-delay: 0s;
}
.dot-pulse::after {
box-shadow: 10014px 0 0 -4px;
animation: pixel-banner-dot-pulse-after 1.5s infinite linear;
animation-delay: 0.5s;
}
@keyframes pixel-banner-dot-pulse-before {
0% { box-shadow: 9984px 0 0 -4px; }
30% { box-shadow: 9984px 0 0 2px; }
60%, 100% { box-shadow: 9984px 0 0 -4px; }
}
@keyframes pixel-banner-dot-pulse {
0% { box-shadow: 9999px 0 0 -4px; }
30% { box-shadow: 9999px 0 0 2px; }
60%, 100% { box-shadow: 9999px 0 0 -4px; }
}
@keyframes pixel-banner-dot-pulse-after {
0% { box-shadow: 10014px 0 0 -4px; }
30% { box-shadow: 10014px 0 0 2px; }
60%, 100% { box-shadow: 10014px 0 0 -4px; }
}
@keyframes pixel-banner-token-bounce {
0% { transform: scale(1); }
50% { transform: scale(1.2); }
100% { transform: scale(1); }
}
@keyframes pixel-banner-token-glow {
0% { text-shadow: 0 0 0px rgba(255, 215, 0, 0); }
50% { text-shadow: 0 0 15px var(--text-accent-hover); }
100% { text-shadow: 0 0 0px rgba(255, 215, 0, 0); }
}
.token-balance-animation {
animation: pixel-banner-token-bounce 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275), pixel-banner-token-glow 0.7s ease-in-out;
display: inline-block;
}
.radial-pulse-animation {
box-shadow: 0 0;
animation-delay: 0ms;
animation-duration: 3.4s;
animation-direction: normal;
animation-iteration-count: infinite;
animation-name: pixel-banner-radial-pulse;
}
/* animation for an element to scale up and down */
.pixel-banner-scale-up-down-animation {
animation: pixel-banner-scale-up-down 3s ease-in-out infinite;
}
/* --------------------------- */
/* -- top left icon buttons -- */
/* --------------------------- */
.select-image-icon,
.pin-icon,
.refresh-icon,
.view-image-icon {
z-index: var(--layer-modal);
opacity: 0.35;
transition: all 0.4s ease-in-out;
animation: pixel-banner-icon-fade-in 0.4s ease-in-out;
width: unset !important;
}
.select-image-icon:hover,
.pin-icon:hover,
.refresh-icon:hover,
.view-image-icon:hover {
opacity: 1 !important;
cursor: pointer;
transform: scale(1.2);
}
/* ------------------------- */
/* -- banner icon overlay -- */
/* ------------------------- */
.banner-icon-overlay {
--pixel-banner-icon-translate-x: calc(var(--pixel-banner-icon-x, 25%) * -1);
transform: translate(var(--pixel-banner-icon-translate-x), var(--pixel-banner-icon-translate-y, -15%)) rotate(var(--pixel-banner-icon-rotate, 0deg));
transform-origin: center;
position: absolute !important;
top: var(--pixel-banner-icon-start, 0px);
left: var(--pixel-banner-icon-x, 25%);
/* the variable already carries px */
margin-top: var(--pixel-banner-icon-vertical-offset, 0px);
padding-top: var(--pixel-banner-icon-padding-y, 0) !important;
padding-right: var(--pixel-banner-icon-padding-x, 0) !important;
padding-bottom: var(--pixel-banner-icon-padding-y, 0) !important;
padding-left: var(--pixel-banner-icon-padding-x, 0) !important;
opacity: var(--pixel-banner-icon-opacity, 100%);
color: var(--pixel-banner-icon-color, var(--text-normal));
font-size: var(--pixel-banner-icon-size, 70px);
font-weight: var(--pixel-banner-icon-font-weight, normal);
background: var(--pixel-banner-icon-background-color, unset);
border-radius: var(--pixel-banner-icon-border-radius, 17px);
white-space: nowrap;
word-break: break-word;
width: max-content !important;
max-width: var(--pixel-banner-width, 100%) !important;
pointer-events: none;
display: flex !important;
align-items: center;
gap: 0.3em;
flex-wrap: nowrap;
text-wrap: nowrap;
}
/* banner icon image */
.banner-icon-overlay > img {
height: var(--pixel-banner-icon-image-size-multiplier, 1em);
}
/* banner icon text */
.banner-icon-overlay > .banner-icon-text {
position: relative;
top: var(--pixel-banner-icon-text-vertical-offset, 0);
line-height: var(--pixel-banner-icon-size, 1);
}
/* ----------------------- */
/* -- PDF export banner -- */
/* ----------------------- */
/* Export to PDF renders into .print; printBanner.js puts an <img> there in normal
flow, styled from the same --pixel-banner-* variables as the pane (issue #323) */
.print .pixel-banner-print {
position: relative;
display: block;
width: 100%;
margin: 0 0 1em 0;
break-inside: avoid;
}
/* height is capped at about 40% of the page */
.print .pixel-banner-print .pixel-banner-print-image {
display: block;
width: 100%;
height: min(var(--pixel-banner-height, 350px), 40vh);
object-fit: cover;
object-position: var(--pixel-banner-x-position, 50%) var(--pixel-banner-y-position, 50%);
border-radius: var(--pixel-banner-radius, 17px);
mask-image: linear-gradient(to bottom, black calc(100% + var(--pixel-banner-fade, -75%)), transparent);
-webkit-mask-image: linear-gradient(to bottom, black calc(100% + var(--pixel-banner-fade, -75%)), transparent);
}
.print .pixel-banner-print .pixel-banner-print-image.pixel-banner-print-contain {
object-fit: contain;
}
/* the icon (cloned from the pane) straddles the bottom edge of the capped banner */
.print .pixel-banner-print .banner-icon-overlay {
top: calc(min(var(--pixel-banner-height, 350px), 40vh) - (var(--pixel-banner-icon-size, 70px) / 2));
}
.print .pixel-banner-print.has-icon {
padding-bottom: calc(var(--pixel-banner-icon-size, 70px) / 2);
}
/* icon-only note: no banner, so the icon sits in normal flow and the wrapper takes its */
/* height. left and the transform stay, so the x position matches the pane */
.print .pixel-banner-print.pixel-banner-print-icon-only .banner-icon-overlay {
position: relative !important;
top: 0;
}
/* title color, only when the PDF has a banner: the file name title that "Include
file name as title" adds, the PDF's counterpart of the pane's inline title. It
is a bare h1 directly in the container, after the banner; body headings sit in
section divs, so they keep their color */
.print .markdown-preview-view > .pixel-banner-print ~ h1 {
color: var(--pixel-banner-title-color, inherit);
}
/* ----------------------------------- */
/* -- various plugin conflict fixes -- */
/* ----------------------------------- */
/* hide banner images and related icons in search-result-container */
.search-result-container .select-image-icon,
.search-result-container .pin-icon,
.search-result-container .refresh-icon,
.search-result-container .view-image-icon,
.search-result-container .banner-icon-overlay,
.search-result-container .pixel-banner-image {
display: none !important;
}
/* better search views ⇢ hide banner images and related icons in backlink-pane / outgoing-link-pane */
.backlink-pane .select-image-icon,
.backlink-pane .pin-icon,
.backlink-pane .refresh-icon,
.backlink-pane .view-image-icon,
.backlink-pane .banner-icon-overlay,
.backlink-pane .pixel-banner-image {
display: none !important;
}
.outgoing-link-pane .select-image-icon,
.outgoing-link-pane .pin-icon,
.outgoing-link-pane .refresh-icon,
.outgoing-link-pane .view-image-icon,
.outgoing-link-pane .banner-icon-overlay,
.outgoing-link-pane .pixel-banner-image {
display: none !important;
}
/* ========================== */
/* == Confetti Modal Styles == */
/* ========================== */
/* Scoped under .confetti-modal, the modal's content root */
.confetti-modal {
max-width: 600px;
padding: 16px;
}
.confetti-modal .confetti-modal-header {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 20px;
border-bottom: 1px solid var(--background-modifier-border);
padding-bottom: 10px;
}
.confetti-modal .confetti-modal-title {
margin: 0;
}
.confetti-modal .modified-indicator {
color: var(--text-warning);
font-size: 0.9em;
}
.confetti-modal .section-header {
margin-top: 20px;
margin-bottom: 10px;
font-weight: bold;
color: var(--text-muted);
}
.confetti-modal .confetti-section {
margin-bottom: 15px;
}
.confetti-modal .is-hidden {
display: none;
}
/* Why the live preview is not shown (reduced motion, Disable on Mobile) */
.confetti-modal .confetti-preview-notice {
margin-bottom: 15px;
color: var(--text-muted);
font-size: var(--font-ui-small);
}
/* Live preview layer: a child of the modal container, fixed over the
modal's bounds (CSS variables set from JS) so it doesn't scroll with the content */
.pixel-banner-confetti-preview-layer {
position: fixed;
top: var(--confetti-preview-top, 0);
left: var(--confetti-preview-left, 0);
width: var(--confetti-preview-width, 0);
height: var(--confetti-preview-height, 0);
pointer-events: none;
overflow: hidden;
z-index: 1;
}
/* Keeps Shape and 3D Wobble from collapsing after the sections are hidden and shown */
.confetti-modal .confetti-select {
min-width: 160px;
}
/* Number boxes beside the sliders */
.confetti-modal input.confetti-number-input {
width: 70px;
}
/* A setting that does not apply right now (Interval while Continuous is off) */
.confetti-modal .confetti-setting-disabled {
opacity: 0.5;
pointer-events: none;
}
.confetti-modal .color-swatches {
display: flex;
gap: 8px;
flex-wrap: wrap;
align-items: center;
}
.confetti-modal .color-swatch {
width: 32px;
height: 32px;
border-radius: 4px;
cursor: pointer;
border: 2px solid var(--background-modifier-border);
background-color: var(--confetti-swatch-color, transparent);
position: relative;
transition: transform 0.1s ease;
}
.confetti-modal .color-swatch:hover {
transform: scale(1.1);
}
.confetti-modal .color-swatch:hover .remove-color,
.confetti-modal .color-swatch:focus-within .remove-color {
display: flex;
}
/* Touch screens have no hover: always show remove */
@media (hover: none) {
.confetti-modal .color-swatch .remove-color {
display: flex;
}
}
.confetti-modal .color-input-hidden {
position: absolute;
inset: 0;
opacity: 0;
width: 100%;
height: 100%;
padding: 0;
border: none;
cursor: pointer;
}
.confetti-modal .color-swatch:focus-within {
outline: 2px solid var(--interactive-accent);
outline-offset: 1px;
}
.confetti-modal .remove-color {
display: none;
padding: 0;
box-shadow: none;
line-height: 1;
position: absolute;
top: -8px;
right: -8px;
width: 18px;
height: 18px;
background-color: var(--text-error);
color: white;
border-radius: 50%;
font-size: 10px;
font-weight: bold;
justify-content: center;
align-items: center;
cursor: pointer;
z-index: 10;
}
.confetti-modal .add-color {
padding: 0;
box-shadow: none;
background-color: transparent;
width: 32px;
height: 32px;
border-radius: 4px;
cursor: pointer;
border: 2px dashed var(--background-modifier-border);
display: flex;
justify-content: center;
align-items: center;
font-size: 20px;
color: var(--text-muted);
transition: all 0.2s ease;
}
.confetti-modal .add-color:hover {
border-color: var(--interactive-accent);
color: var(--interactive-accent);
transform: scale(1.1);
}
.confetti-modal .confetti-actions {
display: flex;
justify-content: flex-end;
gap: 10px;