FIX: Reduce icon jitter in Safari

FIX: Reduce icon jitter in Safari

Sometimes a blurred image would cause SVG icon jitter on scroll, this hack that forces GPU acceleration seems to fix it

diff --git a/assets/stylesheets/discourse_spoiler_alert.css b/assets/stylesheets/discourse_spoiler_alert.css
index a2aedb9..21c55b5 100644
--- a/assets/stylesheets/discourse_spoiler_alert.css
+++ b/assets/stylesheets/discourse_spoiler_alert.css
@@ -5,3 +5,7 @@
 .spoiled svg {
   vertical-align: middle;
 }
+
+.spoiled img {
+  -webkit-transform: translateZ(0); // Safari jitter fix
+}

GitHub sha: 09548483

2 Likes