-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathperformance-optimizations.css
More file actions
200 lines (164 loc) · 5.06 KB
/
Copy pathperformance-optimizations.css
File metadata and controls
200 lines (164 loc) · 5.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
/* ============================================================================
PERFORMANCE OPTIMIZATIONS FOR MAIN-THREAD WORK REDUCTION
Apply these changes to reduce Style & Layout time from 3.8s
============================================================================ */
/* 1. DEFER NON-CRITICAL ANIMATIONS - Add to sections below fold */
.library, .about, .faq {
content-visibility: auto;
contain-intrinsic-size: auto 500px;
}
/* 2. OPTIMIZE HERO ANIMATIONS - Reduce animation complexity */
.hero-title, .hero-subtitle, .hero-author, .hero-blessing {
animation: none !important;
opacity: 1 !important;
transform: none !important;
}
/* 3. OPTIMIZE PARTICLES - Disable heavy JavaScript particles, use pure CSS */
.particles-container {
display: none; /* Disable JavaScript particles */
}
/* FIX CLS: Apply stars directly to .hero-bg without ::after to prevent 0.096 layout shift */
.hero-bg {
background-image:
var(--temple-gradient),
radial-gradient(2px 2px at 20% 30%, rgba(232, 196, 104, 0.2), transparent),
radial-gradient(2px 2px at 60% 70%, rgba(232, 196, 104, 0.15), transparent),
radial-gradient(1px 1px at 50% 50%, rgba(232, 196, 104, 0.25), transparent),
radial-gradient(1px 1px at 30% 80%, rgba(232, 196, 104, 0.2), transparent),
radial-gradient(2px 2px at 90% 10%, rgba(232, 196, 104, 0.15), transparent),
radial-gradient(1px 1px at 40% 40%, rgba(232, 196, 104, 0.18), transparent),
radial-gradient(2px 2px at 70% 20%, rgba(232, 196, 104, 0.22), transparent),
radial-gradient(1px 1px at 10% 60%, rgba(232, 196, 104, 0.2), transparent);
background-size: auto, 200px 200px, 200px 200px, 200px 200px, 200px 200px, 200px 200px, 200px 200px, 200px 200px, 200px 200px;
background-repeat: no-repeat, repeat, repeat, repeat, repeat, repeat, repeat, repeat, repeat;
}
/* 4. REDUCE TRANSFORM ANIMATIONS - Use opacity instead where possible */
.divine-image {
transition: opacity 0.3s ease !important;
transform: none !important;
}
.divine-image:hover {
opacity: 0.9 !important;
transform: none !important;
}
/* 5. DISABLE CONTINUOUS ANIMATIONS */
@keyframes divineGlowIdle {
0%, 100% { box-shadow: 0 0 20px var(--accent-color); }
}
@keyframes divineGlow {
0%, 100% { box-shadow: 0 0 25px var(--accent-color); }
}
@keyframes particleFloat {
from { opacity: 0; }
to { opacity: 0; }
}
/* 6. OPTIMIZE BOOK CARDS - Remove transforms on hover */
.book-card {
transition: box-shadow 0.3s ease !important;
transform: none !important;
will-change: auto !important;
}
.book-card:hover {
transform: none !important;
}
/* 7. REDUCE COMPLEX SELECTORS - Simplify descendant selectors */
.faq-block {
contain: layout style paint;
}
/* 8. OPTIMIZE SCROLL ARROW */
.scroll-arrow {
animation: bounceDown 3s infinite ease-in-out !important; /* Slower animation */
}
@keyframes bounceDown {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(8px); }
}
/* 9. DEFER OFF-SCREEN CONTENT */
.footer {
content-visibility: auto;
}
/* 10. OPTIMIZE NAV TRANSITIONS */
.nav-menu a {
transition: color 0.2s ease !important;
}
/* 11. REDUCE REFLOWS - Lock dimensions */
.hero {
min-height: 100vh;
height: auto;
}
.hero-content {
min-height: 300px;
}
/* 12. OPTIMIZE DIVINE PRESENCE LAYOUT */
.divine-presence {
contain: layout;
}
/* 13. DISABLE SHIMMER EFFECT (HIGH COST) */
.scroll-prompt::before {
animation: none !important;
}
/* 14. OPTIMIZE SHAPES */
.custom-shape-divider-bottom-1685027373 {
will-change: auto;
transform: translateZ(0);
}
/* 15. REDUCE PAINT COMPLEXITY */
.book-card {
contain: layout paint;
}
/* 16. OPTIMIZE FAQ ANIMATIONS */
.faq-block {
transition: none !important;
}
.faq-content {
transition: none !important;
}
/* 17. DISABLE FLOAT ANIMATION */
@keyframes float {
0%, 100% { transform: translate(-50%, 0); }
}
/* 18. CRITICAL: Remove will-change from static elements */
.hero-bg, .hero-title, .hero-subtitle, .hero-author, .hero-blessing {
will-change: auto !important;
}
/* 19. BATCH LAYOUT CHANGES */
section {
contain: layout;
}
/* 20. REDUCE GRADIENT COMPLEXITY */
.card-bg-gradient {
background: var(--card-bg) !important;
}
/* ===== CLS FIXES ===== */
/* Fix 21: Prevent list item shifts during font load */
li {
min-height: 1.6em;
line-height: 1.6;
}
nav li, .nav-menu li {
min-height: 1.6rem;
contain: layout;
}
/* Fix 22: Lock FAQ list items */
.faq-content li {
min-height: 1.8em;
}
/* Fix 23: Prevent nav menu shifts */
.nav-menu {
min-height: 1.6rem;
contain: layout style;
}
/* Fix 24: Lock header height */
.header {
min-height: 80px;
contain: layout;
}
/* Fix 25: Prevent book card shifts */
.book-card {
min-height: 400px;
}
/* Fix 26: Lock footer dimensions */
.footer {
min-height: 200px;
contain: layout;
}