Skip to content

Commit bd1b882

Browse files
Bikram GoleBikram Gole
authored andcommitted
Improve scroll and panel performance
1 parent 19a3425 commit bd1b882

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

styles.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,6 +1191,7 @@ main {
11911191

11921192
section {
11931193
scroll-margin-top: 6rem;
1194+
scroll-margin-bottom: 6rem;
11941195
}
11951196

11961197
.hero,
@@ -1202,6 +1203,13 @@ section {
12021203
transition: border-color var(--motion-base) var(--ease-soft), box-shadow var(--motion-slow) var(--ease-soft), background var(--motion-base) var(--ease-soft);
12031204
}
12041205

1206+
@supports (content-visibility: auto) {
1207+
.panel {
1208+
content-visibility: auto;
1209+
contain-intrinsic-size: 1px 620px;
1210+
}
1211+
}
1212+
12051213
.skew-left {
12061214
transform: rotate(-0.32deg);
12071215
}
@@ -1210,6 +1218,13 @@ section {
12101218
transform: rotate(0.32deg);
12111219
}
12121220

1221+
@media (prefers-reduced-motion: reduce) {
1222+
.skew-left,
1223+
.skew-right {
1224+
transform: none;
1225+
}
1226+
}
1227+
12131228
.hero {
12141229
padding: 0.9rem;
12151230
position: relative;

0 commit comments

Comments
 (0)