|
334 | 334 | left: 0; |
335 | 335 | width: 100vw; |
336 | 336 | height: 100vh; |
337 | | - pointer-events: none |
| 337 | + pointer-events: none; |
| 338 | + background: transparent; |
338 | 339 | } |
339 | 340 | .crumple:after { |
340 | 341 | content: ""; |
|
345 | 346 | width: 100%; |
346 | 347 | height: 100%; |
347 | 348 | background-color: #222; |
| 349 | + z-index: 1; |
348 | 350 | } |
349 | 351 |
|
350 | 352 | .crumple:before { |
|
356 | 358 | width: 100%; |
357 | 359 | height: 100%; |
358 | 360 | background-color: transparent; |
359 | | - z-index: 1; |
| 361 | + z-index: 2; |
360 | 362 | } |
361 | 363 |
|
362 | 364 | @-webkit-keyframes circle-one { |
|
404 | 406 | } |
405 | 407 |
|
406 | 408 | @media (hover: hover) { |
407 | | - .footer > a:nth-child(odd):hover~.crumple { |
408 | | - background: #1E90FF; /* fallback for old browsers */ |
409 | | - background: -webkit-linear-gradient(45deg, #1E90FF, #00BFFF); /* Chrome 10-25, Safari 5.1-6 */ |
410 | | - background: linear-gradient(45deg, #1E90FF, #00BFFF); |
| 409 | + .footer:hover ~ .crumple { |
| 410 | + z-index: 0; |
| 411 | + } |
| 412 | + |
| 413 | + /* Use body-level selectors to target crumple */ |
| 414 | + body:has(.footer > a:nth-child(odd):hover) .crumple { |
| 415 | + background: #1E90FF; |
| 416 | + background: -webkit-linear-gradient(45deg, #1E90FF, #00BFFF); |
| 417 | + background: linear-gradient(45deg, #1E90FF, #00BFFF); |
411 | 418 | background-size: 400% 400%; |
| 419 | + z-index: 0; |
412 | 420 | } |
413 | | - .footer > a:nth-child(2n):hover~.crumple { |
414 | | - background: #66CDAA; /* fallback for old browsers */ |
415 | | - background: -webkit-linear-gradient(45deg, #66CDAA, #20B2AA); /* Chrome 10-25, Safari 5.1-6 */ |
| 421 | + |
| 422 | + body:has(.footer > a:nth-child(2n):hover) .crumple { |
| 423 | + background: #66CDAA; |
| 424 | + background: -webkit-linear-gradient(45deg, #66CDAA, #20B2AA); |
416 | 425 | background: linear-gradient(45deg, #19e6a1, #00d1c7); |
417 | 426 | background-size: 400% 400%; |
| 427 | + z-index: 0; |
418 | 428 | } |
419 | | - .footer > a:nth-child(3n):hover~.crumple { |
420 | | - background: #66CDAA; /* fallback for old browsers */ |
421 | | - background: -webkit-linear-gradient(45deg, #66CDAA, #20B2AA); /* Chrome 10-25, Safari 5.1-6 */ |
| 429 | + |
| 430 | + body:has(.footer > a:nth-child(3n):hover) .crumple { |
| 431 | + background: #66CDAA; |
| 432 | + background: -webkit-linear-gradient(45deg, #66CDAA, #20B2AA); |
422 | 433 | background: linear-gradient(45deg, #ff6347, #ff4747); |
423 | 434 | background-size: 400% 400%; |
| 435 | + z-index: 0; |
424 | 436 | } |
425 | | - .footer > a:hover~.crumple { |
| 437 | + |
| 438 | + body:has(.footer > a:hover) .crumple { |
426 | 439 | -webkit-animation: gradient 30s ease infinite; |
427 | 440 | animation: gradient 30s ease infinite; |
428 | 441 | } |
429 | 442 |
|
430 | | - .footer__link--writings:hover~.crumple .crumple__rect { |
| 443 | + body:has(.footer__link--writings:hover) .crumple .crumple__rect { |
431 | 444 | -webkit-animation: rectangle-reveal 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards; |
432 | 445 | animation: rectangle-reveal 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards; |
| 446 | + background-color: #e619c4; |
433 | 447 | } |
434 | 448 |
|
435 | | - .footer__link--writings:hover~.crumple:after { |
| 449 | + body:has(.footer__link--writings:hover) .crumple:after { |
436 | 450 | -webkit-animation: circle-one 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards; |
437 | 451 | animation: circle-one 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards; |
438 | 452 | background-color: #222; |
439 | 453 | z-index: 2; |
440 | 454 | } |
441 | 455 |
|
442 | | - .footer__link--writings:hover~.crumple:before { |
| 456 | + body:has(.footer__link--writings:hover) .crumple:before { |
443 | 457 | -webkit-animation: circle-two 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards; |
444 | 458 | animation: circle-two 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards; |
445 | 459 | background-color: #ff6347; |
446 | 460 | z-index: 2; |
447 | 461 | } |
448 | | - .footer__link--github:hover~.crumple:after { |
| 462 | + |
| 463 | + body:has(.footer__link--github:hover) .crumple:after { |
449 | 464 | -webkit-animation: b 1s .25s linear forwards; |
450 | 465 | animation: b 1s .25s linear forwards |
451 | 466 | } |
452 | | - .footer__link--playlists:hover~.crumple:after { |
| 467 | + |
| 468 | + body:has(.footer__link--playlists:hover) .crumple:after { |
453 | 469 | -webkit-animation: c 1s .25s linear forwards; |
454 | 470 | animation: c 1s .25s linear forwards |
455 | 471 | } |
456 | | - .footer__link--linkedin:hover~.crumple:after { |
| 472 | + |
| 473 | + body:has(.footer__link--linkedin:hover) .crumple:after { |
457 | 474 | -webkit-animation: e 1s .25s linear forwards; |
458 | 475 | animation: e 1s .25s linear forwards |
459 | 476 | } |
460 | | - .footer__link--twitter:hover~.crumple:after { |
| 477 | + |
| 478 | + body:has(.footer__link--twitter:hover) .crumple:after { |
461 | 479 | -webkit-animation: e 1s .25s linear forwards; |
462 | 480 | animation: e 1s .25s linear forwards |
463 | 481 | } |
464 | | - .footer__link--instagram:hover~.crumple:after { |
| 482 | + |
| 483 | + body:has(.footer__link--instagram:hover) .crumple:after { |
465 | 484 | -webkit-animation: f 1s .25s linear forwards; |
466 | 485 | animation: f 1s .25s linear forwards |
467 | 486 | } |
|
494 | 513 | display: block; |
495 | 514 | width: calc(100vw + 50vh); |
496 | 515 | height: 100%; |
497 | | - background-color: #19e6a1; |
| 516 | + background-color: transparent; |
498 | 517 | z-index: 0; |
499 | 518 | } |
500 | 519 |
|
501 | 520 | /* Crumple Animation */ |
502 | | -.footer__link--home:hover~.crumple:after { |
| 521 | +body:has(.footer__link--home:hover) .crumple:after { |
503 | 522 | -webkit-animation: a 1s .25s linear forwards; |
504 | 523 | animation: a 1s .25s linear forwards |
505 | 524 | } |
0 commit comments