@@ -640,16 +640,66 @@ body:has(.footer__link--home:hover) .crumple:after {
640640 }
641641}
642642
643- /* Mobile Scroll Test - Trigger animations on scroll */
643+ /* Mobile JavaScript Trigger Support */
644644@media (hover : none) and (pointer : coarse) {
645- /* Test if animations work by triggering on scroll */
646- body : has (.footer__link--writings ) .crumple {
645+ /* Trigger animations via JavaScript-added classes */
646+ body : has (.footer__link--home . mobile-trigger ) .crumple {
647647 background : # 020121 ;
648648 z-index : 0 ;
649649 }
650650
651- body : has (.footer__link--writings ) .crumple : after {
651+ body : has (.footer__link--home .mobile-trigger ) .crumple : after {
652+ -webkit-animation : a 1s .25s linear forwards;
653+ animation : a 1s .25s linear forwards;
654+ }
655+
656+ body : has (.footer__link--writings .mobile-trigger ) .crumple {
657+ background : # 020121 ;
658+ z-index : 0 ;
659+ }
660+
661+ body : has (.footer__link--writings .mobile-trigger ) .crumple : after {
652662 -webkit-animation : e 1s .25s linear forwards;
653663 animation : e 1s .25s linear forwards;
654664 }
665+
666+ body : has (.footer__link--github .mobile-trigger ) .crumple {
667+ background : # 012118 ;
668+ z-index : 0 ;
669+ }
670+
671+ body : has (.footer__link--github .mobile-trigger ) .crumple : after {
672+ -webkit-animation : b 1s .25s linear forwards;
673+ animation : b 1s .25s linear forwards;
674+ }
675+
676+ body : has (.footer__link--playlists .mobile-trigger ) .crumple {
677+ background : # 210120 ;
678+ z-index : 0 ;
679+ }
680+
681+ body : has (.footer__link--playlists .mobile-trigger ) .crumple : after {
682+ -webkit-animation : c 1s .25s linear forwards;
683+ animation : c 1s .25s linear forwards;
684+ }
685+
686+ body : has (.footer__link--instagram .mobile-trigger ) .crumple {
687+ background : # 210120 ;
688+ z-index : 0 ;
689+ }
690+
691+ body : has (.footer__link--instagram .mobile-trigger ) .crumple : after {
692+ -webkit-animation : f 1s .25s linear forwards;
693+ animation : f 1s .25s linear forwards;
694+ }
695+
696+ body : has (.footer__link--alhambra .mobile-trigger ) .crumple {
697+ background : # 020121 ;
698+ z-index : 0 ;
699+ }
700+
701+ body : has (.footer__link--alhambra .mobile-trigger ) .crumple : after {
702+ -webkit-animation : d 1s .25s linear forwards;
703+ animation : d 1s .25s linear forwards;
704+ }
655705}
0 commit comments