maverick-wave 5.36.0 → 5.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/maverick-wave.min.css +2 -2
- package/maverick-wave.min.js +1 -1
- package/package.json +2 -2
- package/src/js/main.js +15 -0
- package/src/scss/components/_faq.scss +156 -0
- package/src/scss/components/_index.scss +1 -0
- package/src/scss/components/_occasions.scss +67 -47
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
//
|
|
9
9
|
// <html class="mw-occasion-snow"> static, CSS only
|
|
10
10
|
// <html class="mw-occasion-snow mw-occasion-scroll"> arrives with the scroll
|
|
11
|
+
// <div class="mw-card mw-occasion-snow"> this card alone
|
|
11
12
|
//
|
|
12
13
|
// The intro overlay and the particles that drift with the scroll are the two
|
|
13
14
|
// parts that need the script; everything they show is drawn here.
|
|
@@ -391,16 +392,6 @@ $_effects: (
|
|
|
391
392
|
anniversary
|
|
392
393
|
);
|
|
393
394
|
|
|
394
|
-
// Cards, panels and testimonials, unless inside one another - a nested card
|
|
395
|
-
// would stack a second garland into the first - plus whatever opts in
|
|
396
|
-
$_surfaces: '.mw-card, .mw-panel, .mw-testimonial';
|
|
397
|
-
$_surface: ':is(#{$_surfaces}):not(:is(#{$_surfaces}) *, .mw-occasion-skip)';
|
|
398
|
-
$_host: '#{$_surface}, .mw-occasion-spot';
|
|
399
|
-
|
|
400
|
-
@function _on($effect, $mode: '') {
|
|
401
|
-
@return ':root#{$mode}.mw-occasion-#{$effect} :is(#{$_host})';
|
|
402
|
-
}
|
|
403
|
-
|
|
404
395
|
@function _list-classes() {
|
|
405
396
|
$classes: ();
|
|
406
397
|
|
|
@@ -411,6 +402,30 @@ $_host: '#{$_surface}, .mw-occasion-spot';
|
|
|
411
402
|
@return $classes;
|
|
412
403
|
}
|
|
413
404
|
|
|
405
|
+
$_effect-classes: _list-classes();
|
|
406
|
+
|
|
407
|
+
// Cards, panels and testimonials, unless inside one another - a nested card
|
|
408
|
+
// would stack a second garland into the first - plus whatever opts in. A
|
|
409
|
+
// surface with an effect class of its own shows that one and leaves the site's.
|
|
410
|
+
$_surfaces: '.mw-card, .mw-panel, .mw-testimonial';
|
|
411
|
+
$_carriers: '#{$_surfaces}, .mw-occasion-spot';
|
|
412
|
+
$_surface: ':is(#{$_surfaces}):not(:is(#{$_surfaces}) *, .mw-occasion-skip, #{$_effect-classes})';
|
|
413
|
+
$_host: '#{$_surface}, .mw-occasion-spot:not(#{$_effect-classes})';
|
|
414
|
+
|
|
415
|
+
// Every surface while the site wears the effect, and the one surface that
|
|
416
|
+
// carries it itself - a single card showing it off. $mode goes where the
|
|
417
|
+
// effect class sits, on the root or on that surface.
|
|
418
|
+
@function _on($effect, $mode: '', $then: '::before') {
|
|
419
|
+
@return ':root#{$mode}.mw-occasion-#{$effect} :is(#{$_host})#{$then}, ' +
|
|
420
|
+
'.mw-occasion-#{$effect}#{$mode}:is(#{$_carriers})#{$then}';
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
// The same without the spots, for what a surface draws on its own background
|
|
424
|
+
@function _surface-on($effect) {
|
|
425
|
+
@return ':root.mw-occasion-#{$effect} #{$_surface}, ' +
|
|
426
|
+
'.mw-occasion-#{$effect}:is(#{$_surfaces})';
|
|
427
|
+
}
|
|
428
|
+
|
|
414
429
|
@function _scaled($value) {
|
|
415
430
|
@return calc(#{$value} * var(--mw-occasion-scale));
|
|
416
431
|
}
|
|
@@ -423,7 +438,7 @@ $_host: '#{$_surface}, .mw-occasion-spot';
|
|
|
423
438
|
// So every piece sits top left, mirrored because the art is drawn for a right
|
|
424
439
|
// corner. transform and not `scale`: the arrival animations own that one.
|
|
425
440
|
@mixin _corner($effect, $top, $width, $height, $side: -4px) {
|
|
426
|
-
#{_on($effect)}
|
|
441
|
+
#{_on($effect)} {
|
|
427
442
|
top: _scaled($top);
|
|
428
443
|
left: _scaled($side);
|
|
429
444
|
width: _scaled($width);
|
|
@@ -440,7 +455,7 @@ $_host: '#{$_surface}, .mw-occasion-spot';
|
|
|
440
455
|
// surface's own width, which a viewport query cannot: a card in a three-column
|
|
441
456
|
// grid is as narrow as a phone.
|
|
442
457
|
@mixin _edge($effect, $top, $height, $left: 4px) {
|
|
443
|
-
#{_on($effect)}
|
|
458
|
+
#{_on($effect)} {
|
|
444
459
|
top: $top;
|
|
445
460
|
left: $left;
|
|
446
461
|
width: min(
|
|
@@ -528,12 +543,13 @@ $_host: '#{$_surface}, .mw-occasion-spot';
|
|
|
528
543
|
--mw-occasion-amount: 1;
|
|
529
544
|
}
|
|
530
545
|
|
|
531
|
-
|
|
546
|
+
// On the root for the site, on a surface for that one surface
|
|
547
|
+
.mw-occasion-sm {
|
|
532
548
|
--mw-occasion-scale: 0.88;
|
|
533
549
|
--mw-occasion-amount: 0.55;
|
|
534
550
|
}
|
|
535
551
|
|
|
536
|
-
|
|
552
|
+
.mw-occasion-lg {
|
|
537
553
|
--mw-occasion-scale: 1.1;
|
|
538
554
|
--mw-occasion-amount: 1.3;
|
|
539
555
|
}
|
|
@@ -556,39 +572,42 @@ $_host: '#{$_surface}, .mw-occasion-spot';
|
|
|
556
572
|
);
|
|
557
573
|
|
|
558
574
|
@each $effect, $reach in $_reach {
|
|
559
|
-
|
|
575
|
+
.mw-occasion-#{$effect} {
|
|
560
576
|
--mw-occasion-reach: #{$reach};
|
|
561
577
|
}
|
|
562
578
|
}
|
|
563
579
|
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
// A panel clips for its rounded header, which rounds itself - the same
|
|
572
|
-
// escape the dropdown uses, for as long as an occasion is on
|
|
573
|
-
.mw-panel:not(:is(#{$_surfaces}) *, .mw-occasion-skip) {
|
|
574
|
-
overflow: visible;
|
|
580
|
+
// Room above for what rises over the top edge - stacked in one column on a
|
|
581
|
+
// phone, the piece would otherwise reach into the surface above
|
|
582
|
+
:root:is(#{$_effect-classes}) #{$_surface},
|
|
583
|
+
:is(#{$_effect-classes}):is(#{$_surfaces}) {
|
|
584
|
+
margin-top: calc(6px + 30px * (var(--mw-occasion-scale) - 1));
|
|
585
|
+
}
|
|
575
586
|
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
}
|
|
587
|
+
// A panel clips for its rounded header, which rounds itself - the same
|
|
588
|
+
// escape the dropdown uses, for as long as an occasion is on
|
|
589
|
+
:root:is(#{$_effect-classes})
|
|
590
|
+
.mw-panel:not(:is(#{$_surfaces}) *, .mw-occasion-skip),
|
|
591
|
+
.mw-panel:is(#{$_effect-classes}) {
|
|
592
|
+
overflow: visible;
|
|
583
593
|
|
|
584
|
-
.mw-
|
|
594
|
+
> :is(.mw-panel-header, .mw-panel-body):first-child {
|
|
585
595
|
padding-top: max(
|
|
586
|
-
#{spacing('
|
|
596
|
+
#{spacing('4')},
|
|
587
597
|
calc(var(--mw-occasion-reach) * var(--mw-occasion-scale))
|
|
588
598
|
);
|
|
589
599
|
}
|
|
590
600
|
}
|
|
591
601
|
|
|
602
|
+
:root:is(#{$_effect-classes})
|
|
603
|
+
.mw-testimonial:not(:is(#{$_surfaces}) *, .mw-occasion-skip),
|
|
604
|
+
.mw-testimonial:is(#{$_effect-classes}) {
|
|
605
|
+
padding-top: max(
|
|
606
|
+
#{spacing('5')},
|
|
607
|
+
calc(var(--mw-occasion-reach) * var(--mw-occasion-scale))
|
|
608
|
+
);
|
|
609
|
+
}
|
|
610
|
+
|
|
592
611
|
:where(.mw-occasion-spot) {
|
|
593
612
|
position: relative;
|
|
594
613
|
}
|
|
@@ -596,7 +615,7 @@ $_host: '#{$_surface}, .mw-occasion-spot';
|
|
|
596
615
|
// Shared by every effect. z-index 1 keeps the piece above the text and the
|
|
597
616
|
// corner arc, and the card badge - also 1, but later - above the piece.
|
|
598
617
|
@each $effect in $_effects {
|
|
599
|
-
#{_on($effect)}
|
|
618
|
+
#{_on($effect)} {
|
|
600
619
|
content: '';
|
|
601
620
|
position: absolute;
|
|
602
621
|
z-index: 1;
|
|
@@ -634,7 +653,7 @@ $_host: '#{$_surface}, .mw-occasion-spot';
|
|
|
634
653
|
transform-origin: 50% _deep(11px);
|
|
635
654
|
}
|
|
636
655
|
|
|
637
|
-
#{_on('snow'
|
|
656
|
+
#{_on('snow', $then: ':nth-child(even)::before')} {
|
|
638
657
|
background-position:
|
|
639
658
|
40% _deep(13px),
|
|
640
659
|
76% _deep(13px),
|
|
@@ -644,11 +663,11 @@ $_host: '#{$_surface}, .mw-occasion-spot';
|
|
|
644
663
|
0 0;
|
|
645
664
|
}
|
|
646
665
|
|
|
647
|
-
#{_on('snow', '.mw-occasion-sm')}
|
|
666
|
+
#{_on('snow', '.mw-occasion-sm')} {
|
|
648
667
|
background-size: _snow-sizes(1);
|
|
649
668
|
}
|
|
650
669
|
|
|
651
|
-
#{_on('snow', '.mw-occasion-lg')}
|
|
670
|
+
#{_on('snow', '.mw-occasion-lg')} {
|
|
652
671
|
background-size: _snow-sizes(3);
|
|
653
672
|
}
|
|
654
673
|
|
|
@@ -672,16 +691,16 @@ $_host: '#{$_surface}, .mw-occasion-spot';
|
|
|
672
691
|
}
|
|
673
692
|
|
|
674
693
|
// Same baubles, shuffled - repeating the images would double their weight
|
|
675
|
-
#{_on(christmas
|
|
694
|
+
#{_on(christmas, $then: ':nth-child(even)::before')} {
|
|
676
695
|
background-position: _bauble-positions(62% 34% 88% 0);
|
|
677
696
|
}
|
|
678
697
|
|
|
679
|
-
#{_on(christmas, '.mw-occasion-sm')}
|
|
698
|
+
#{_on(christmas, '.mw-occasion-sm')} {
|
|
680
699
|
background-size: _bauble-sizes(2);
|
|
681
700
|
background-position: _bauble-positions(34% 74% 0 0);
|
|
682
701
|
}
|
|
683
702
|
|
|
684
|
-
#{_on(christmas, '.mw-occasion-lg')}
|
|
703
|
+
#{_on(christmas, '.mw-occasion-lg')} {
|
|
685
704
|
background-size: _bauble-sizes(4);
|
|
686
705
|
background-position: _bauble-positions(18% 40% 62% 84%);
|
|
687
706
|
}
|
|
@@ -706,7 +725,7 @@ $_host: '#{$_surface}, .mw-occasion-spot';
|
|
|
706
725
|
background-image: $_sun;
|
|
707
726
|
}
|
|
708
727
|
|
|
709
|
-
|
|
728
|
+
#{_surface-on(summer)} {
|
|
710
729
|
background-image: radial-gradient(
|
|
711
730
|
26rem 16rem at 0 0,
|
|
712
731
|
rgb(255 214 90 / calc(0.13 * var(--mw-occasion-amount))),
|
|
@@ -724,7 +743,7 @@ $_host: '#{$_surface}, .mw-occasion-spot';
|
|
|
724
743
|
background-image: $_ball;
|
|
725
744
|
}
|
|
726
745
|
|
|
727
|
-
|
|
746
|
+
#{_surface-on(football)} {
|
|
728
747
|
background-image: linear-gradient(
|
|
729
748
|
90deg,
|
|
730
749
|
var(--mw-occasion-flag-1) 0 33.34%,
|
|
@@ -798,12 +817,13 @@ $_host: '#{$_surface}, .mw-occasion-spot';
|
|
|
798
817
|
@media (prefers-reduced-motion: no-preference) {
|
|
799
818
|
// Timed by the card's entry, which even the last card on a page completes;
|
|
800
819
|
// 60vh keeps a tall card from arriving only at the top of the screen
|
|
801
|
-
:root.mw-occasion-scroll :is(#{$_host})
|
|
820
|
+
:root.mw-occasion-scroll :is(#{$_host}),
|
|
821
|
+
.mw-occasion-scroll:is(#{$_effect-classes}):is(#{$_carriers}) {
|
|
802
822
|
view-timeline: --mw-occasion-arrival;
|
|
803
823
|
}
|
|
804
824
|
|
|
805
825
|
@each $effect, $arrival in $_arrivals {
|
|
806
|
-
#{_on($effect, '.mw-occasion-scroll')}
|
|
826
|
+
#{_on($effect, '.mw-occasion-scroll')} {
|
|
807
827
|
animation-name: mw-occasion-#{$arrival};
|
|
808
828
|
animation-duration: auto;
|
|
809
829
|
animation-timing-function: linear;
|
|
@@ -1590,7 +1610,7 @@ $_host: '#{$_surface}, .mw-occasion-spot';
|
|
|
1590
1610
|
}
|
|
1591
1611
|
|
|
1592
1612
|
@media print, (forced-colors: active) {
|
|
1593
|
-
:is(#{$
|
|
1613
|
+
:is(#{$_carriers})::before,
|
|
1594
1614
|
.mw-occasion-intro,
|
|
1595
1615
|
.mw-occasion-drift {
|
|
1596
1616
|
display: none;
|