From 7256fe9b6fab1940dbc4f188001edf867ad32410 Mon Sep 17 00:00:00 2001 From: lilia Date: Sun, 16 Oct 2016 16:29:52 +0900 Subject: [PATCH] Reduce CPU load from css animations On osx this cuts the load in half. We can probably do better with js-based animations but let this be a quick fix for now. --- stylesheets/_hourglass.scss | 2 +- stylesheets/manifest.css | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/stylesheets/_hourglass.scss b/stylesheets/_hourglass.scss index d2e7ec4e..e8bff4d6 100644 --- a/stylesheets/_hourglass.scss +++ b/stylesheets/_hourglass.scss @@ -17,7 +17,7 @@ } .sand { background: $color; - animation: moveDown linear; + animation: moveDown steps(100); animation-fill-mode: forwards; } &:after { diff --git a/stylesheets/manifest.css b/stylesheets/manifest.css index 1120f5d8..73f8ec9b 100644 --- a/stylesheets/manifest.css +++ b/stylesheets/manifest.css @@ -1539,7 +1539,7 @@ li.entry .error-icon-container { left: 0; } .ios .hourglass .sand { background: #999; - animation: moveDown linear; + animation: moveDown steps(100); animation-fill-mode: forwards; } .ios .hourglass:after { -webkit-mask: url("/images/hourglass_empty.svg") no-repeat center; @@ -1619,7 +1619,7 @@ li.entry .error-icon-container { left: 0; } .android .outgoing .hourglass .sand { background: #999; - animation: moveDown linear; + animation: moveDown steps(100); animation-fill-mode: forwards; } .android .outgoing .hourglass:after { -webkit-mask: url("/images/hourglass_empty.svg") no-repeat center; @@ -1646,7 +1646,7 @@ li.entry .error-icon-container { left: 0; } .android .incoming .hourglass .sand { background: #fff; - animation: moveDown linear; + animation: moveDown steps(100); animation-fill-mode: forwards; } .android .incoming .hourglass:after { -webkit-mask: url("/images/hourglass_empty.svg") no-repeat center;