mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-10-28 15:25:46 -04:00
set will-change: transform on animated CSS elements
https://developers.google.com/web/fundamentals/performance/rendering/stick-to-compositor-only-properties-and-manage-layer-count
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
"color-contrast": "warn",
|
||||
"link-text": "warn",
|
||||
"long-tasks": "warn",
|
||||
"non-composited-animations": "warn",
|
||||
"total-byte-weight": ["warn", {"minScore": 0.9}],
|
||||
"unminified-javascript": "warn",
|
||||
"unsized-images": "warn",
|
||||
|
||||
@@ -6,12 +6,14 @@
|
||||
animation: wave 5s infinite;
|
||||
animation-delay: 1s;
|
||||
transform-origin: 65% 80%;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.beat {
|
||||
display: inline-block;
|
||||
animation: beat 10s infinite; // 6 bpm, call 911 if you see this please.
|
||||
animation-delay: 7.5s; // offset from wave animation
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
@keyframes wave {
|
||||
|
||||
Reference in New Issue
Block a user