Skip to content

Commit eb90922

Browse files
committed
update crumple.css and main.css to enhance background styles; set fallback colors, adjust z-index for hover states, and improve animation timing for footer links
1 parent 8744887 commit eb90922

File tree

2 files changed

+59
-61
lines changed

2 files changed

+59
-61
lines changed

css/crumple.css

Lines changed: 44 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@
335335
width: 100vw;
336336
height: 100vh;
337337
pointer-events: none;
338-
background: transparent;
338+
background: #111; /* Changed from transparent - acts as fallback */
339339
}
340340
.crumple:after {
341341
content: "";
@@ -347,6 +347,7 @@
347347
height: 100%;
348348
background-color: #111;
349349
z-index: 1;
350+
clip-path: polygon(0 100%, 0 100%, 0 100%, 0 100%, 0 100%, 0 100%); /* Start hidden for reversed animations */
350351
}
351352

352353
.crumple:before {
@@ -472,70 +473,70 @@
472473

473474
@media (hover: hover) {
474475
.footer:hover ~ .crumple {
475-
z-index: 0;
476+
z-index: 2;
476477
}
477478

478479
/* Use body-level selectors to target crumple */
479480
body:has(.footer > a:nth-child(odd):hover) .crumple {
480-
background: #020121;
481-
/* background: -webkit-linear-gradient(45deg, #020121, #210120); */
482-
/* background: linear-gradient(45deg, #020121, #210120); */
483-
background-size: 400% 400%;
484-
z-index: 0;
481+
background: transparent;
482+
z-index: 2;
483+
}
484+
485+
body:has(.footer > a:nth-child(odd):hover) .crumple:after {
486+
background-color: #020121;
485487
}
486488

487489
body:has(.footer > a:nth-child(2n):hover) .crumple {
488-
background: #012118;
489-
background: -webkit-linear-gradient(45deg, #012118, #012118);
490-
background: linear-gradient(45deg, #012118, #012118);
491-
background-size: 400% 400%;
492-
z-index: 0;
490+
background: transparent;
491+
z-index: 2;
492+
}
493+
494+
body:has(.footer > a:nth-child(2n):hover) .crumple:after {
495+
background-color: #012118;
493496
}
494497

495498
body:has(.footer > a:nth-child(3n):hover) .crumple {
496-
background: #210120;
497-
background: -webkit-linear-gradient(45deg, #210120, #210120);
498-
background: linear-gradient(45deg, #210120, #210120);
499-
background-size: 400% 400%;
500-
z-index: 0;
499+
background: transparent;
500+
z-index: 2;
501501
}
502502

503-
body:has(.footer > a:hover) .crumple {
504-
-webkit-animation: gradient 30s ease infinite;
505-
animation: gradient 30s ease infinite;
503+
body:has(.footer > a:nth-child(3n):hover) .crumple:after {
504+
background-color: #210120;
506505
}
507-
506+
508507
body:has(.footer__link--writings:hover) .crumple {
509-
background: #020121;
510-
/* background: -webkit-linear-gradient(45deg, #020121, #210120); */
511-
/* background: linear-gradient(45deg, #020121, #210120); */
512-
background-size: 400% 400%;
513-
z-index: 0;
508+
background: transparent;
509+
z-index: 2;
514510
}
515-
511+
516512
body:has(.footer__link--writings:hover) .crumple:after {
517-
-webkit-animation: e 1s .25s linear forwards;
518-
animation: e 1s .25s linear forwards
513+
background-color: #020121;
514+
-webkit-animation: e 1s 0s linear reverse forwards; /* Changed .25s to 0s */
515+
animation: e 1s 0s linear reverse forwards;
519516
}
520517

521518
body:has(.footer__link--github:hover) .crumple:after {
522-
-webkit-animation: b 1s .25s linear forwards;
523-
animation: b 1s .25s linear forwards
519+
background-color: #012118;
520+
-webkit-animation: b 1s .25s linear reverse forwards;
521+
animation: b 1s .25s linear reverse forwards;
524522
}
525523

526524
body:has(.footer__link--playlists:hover) .crumple:after {
527-
-webkit-animation: c 1s .25s linear forwards;
528-
animation: c 1s .25s linear forwards
525+
background-color: #210120;
526+
-webkit-animation: c 1s .25s linear reverse forwards;
527+
animation: c 1s .25s linear reverse forwards;
529528
}
530529

531530
body:has(.footer__link--instagram:hover) .crumple:after {
532-
-webkit-animation: f 1s .25s linear forwards;
533-
animation: f 1s .25s linear forwards
531+
background-color: #210120;
532+
-webkit-animation: f 1s .25s linear reverse forwards;
533+
animation: f 1s .25s linear reverse forwards;
534534
}
535535

536536
body:has(.footer__link--alhambra:hover) .crumple:after {
537-
-webkit-animation: d 1s .25s linear forwards;
538-
animation: d 1s .25s linear forwards
537+
background-color: #020121;
538+
-webkit-animation: d 1s .25s linear reverse forwards;
539+
animation: d 1s .25s linear reverse forwards;
539540
}
540541
}
541542

@@ -572,21 +573,19 @@
572573

573574
/* Crumple Animation */
574575
body:has(.footer__link--home:hover) .crumple:after {
575-
-webkit-animation: a 1s .25s linear forwards;
576-
animation: a 1s .25s linear forwards
576+
-webkit-animation: a 1s .25s linear reverse forwards;
577+
animation: a 1s .25s linear reverse forwards
577578
}
578579

579-
/* Mobile Touch/Click Support */
580580
@media (hover: none) and (pointer: coarse) {
581-
/* Mobile devices - trigger on touch/click */
582581
body:has(.footer__link--home:active) .crumple {
583582
background: #020121;
584583
z-index: 0;
585584
}
586585

587586
body:has(.footer__link--home:active) .crumple:after {
588-
-webkit-animation: a 1s .25s linear forwards;
589-
animation: a 1s .25s linear forwards;
587+
-webkit-animation: a 1s .25s linear reverse forwards;
588+
animation: a 1s .25s linear reverse forwards;
590589
}
591590

592591
body:has(.footer__link--writings:active) .crumple {
@@ -640,17 +639,15 @@ body:has(.footer__link--home:hover) .crumple:after {
640639
}
641640
}
642641

643-
/* Mobile JavaScript Trigger Support */
644642
@media (hover: none) and (pointer: coarse) {
645-
/* Trigger animations via JavaScript-added classes */
646643
body:has(.footer__link--home.mobile-trigger) .crumple {
647644
background: #020121;
648645
z-index: 0;
649646
}
650647

651648
body:has(.footer__link--home.mobile-trigger) .crumple:after {
652-
-webkit-animation: a 1s .25s linear forwards;
653-
animation: a 1s .25s linear forwards;
649+
-webkit-animation: a 1s .25s linear reverse forwards;
650+
animation: a 1s .25s linear reverse forwards;
654651
}
655652

656653
body:has(.footer__link--writings.mobile-trigger) .crumple {

css/main.css

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,25 @@
99
/* Base Layout */
1010
body {
1111
margin: 0;
12-
background-color: #111;
12+
background-color: transparent; /* Transparent for pages with video/images */
1313
-webkit-font-smoothing: antialiased;
1414
-moz-osx-font-smoothing: grayscale;
1515
display: block;
1616
}
1717

18+
/* Fallback background for pages without video background */
19+
body#trash,
20+
body#essays,
21+
body:not(:has(.video-background)):not(:has(.image-background)):not(:has(.background-images)) {
22+
background-color: #111;
23+
}
24+
25+
/* Or more simply, target specific page IDs */
26+
body#trash,
27+
body#essays {
28+
background-color: #111;
29+
}
30+
1831
.content-wrapper {
1932
position: relative;
2033
z-index: 3;
@@ -119,18 +132,6 @@ a {
119132
height: 100%;
120133
object-fit: cover;
121134
z-index: 0;
122-
opacity: 0.3; /* Adjust this to control video visibility (0.2-0.5 works well) */
123-
}
124-
125-
/* Optional: Add overlay for better text readability */
126-
.video-background::after {
127-
content: '';
128-
position: absolute;
129-
top: 0;
130-
left: 0;
131-
width: 100%;
132-
height: 100%;
133-
background: rgba(34, 34, 34, 0.5); /* Matches your #111 background with transparency */
134-
z-index: 1;
135+
opacity: 1; /* Increase this so video is more visible */
135136
}
136137

0 commit comments

Comments
 (0)