File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -639,3 +639,17 @@ body:has(.footer__link--home:hover) .crumple:after {
639639 animation : d 1s .25s linear forwards;
640640 }
641641}
642+
643+ /* Mobile Scroll Test - Trigger animations on scroll */
644+ @media (hover : none) and (pointer : coarse) {
645+ /* Test if animations work by triggering on scroll */
646+ body : has (.footer__link--writings ) .crumple {
647+ background : # 020121 ;
648+ z-index : 0 ;
649+ }
650+
651+ body : has (.footer__link--writings ) .crumple : after {
652+ -webkit-animation : e 1s .25s linear forwards;
653+ animation : e 1s .25s linear forwards;
654+ }
655+ }
Original file line number Diff line number Diff line change @@ -199,10 +199,23 @@ function initFooterDelay() {
199199 if ( animationName ) {
200200 // Create a temporary style to trigger the animation
201201 const style = document . createElement ( 'style' ) ;
202+ let backgroundStyle = '' ;
203+
204+ // Set background color based on link type
205+ if ( linkClass . includes ( 'footer__link--writings' ) ) {
206+ backgroundStyle = 'background: #020121; z-index: 0;' ;
207+ } else if ( linkClass . includes ( 'footer__link--alhambra' ) ) {
208+ backgroundStyle = 'background: #020121; z-index: 0;' ;
209+ }
210+
202211 style . textContent = `
212+ .crumple {
213+ ${ backgroundStyle }
214+ }
203215 .crumple:after {
204216 -webkit-animation: ${ animationName } 1s .25s linear forwards;
205217 animation: ${ animationName } 1s .25s linear forwards;
218+ background-color: #222;
206219 }
207220 ` ;
208221 document . head . appendChild ( style ) ;
You can’t perform that action at this time.
0 commit comments