fix: keep chapter numerals static and limit scroll reveal to small cards
This commit is contained in:
@@ -126,9 +126,9 @@ html[data-headlight='on'] :is(.project-case-study, .project-card, .contact-desti
|
||||
.project-stage__lead > h2::before {
|
||||
content: '0' counter(chapter);
|
||||
position: absolute;
|
||||
inset-block-end: 100%;
|
||||
inset-inline-start: 0;
|
||||
margin-block-end: 0.15em;
|
||||
inset-block-start: 50%;
|
||||
inset-inline-end: 0;
|
||||
translate: 0 -50%;
|
||||
font: 700 var(--step-4)/0.85 var(--mono);
|
||||
letter-spacing: -0.04em;
|
||||
color: transparent;
|
||||
@@ -156,26 +156,15 @@ html[data-headlight='on'] :is(.project-case-study, .project-card, .contact-desti
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
@supports (animation-timeline: view()) {
|
||||
.portfolio-section > h2::before,
|
||||
.project-stage__lead > h2::before {
|
||||
animation: ns-drift linear both;
|
||||
animation-timeline: view();
|
||||
animation-range: entry 0% cover 60%;
|
||||
}
|
||||
.project-card,
|
||||
.project-case-study {
|
||||
.project-card {
|
||||
animation: ns-rise linear both;
|
||||
animation-timeline: view();
|
||||
animation-range: entry 0% entry 60%;
|
||||
animation-range: entry 0% entry 40%;
|
||||
}
|
||||
}
|
||||
}
|
||||
@keyframes ns-drift {
|
||||
from { transform: translateX(-12%); opacity: 0; }
|
||||
to { transform: none; opacity: 1; }
|
||||
}
|
||||
@keyframes ns-rise {
|
||||
from { transform: translateY(28px); opacity: 0.2; }
|
||||
from { transform: translateY(28px); opacity: 0.45; }
|
||||
to { transform: none; opacity: 1; }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user