Improve preloader performance on non-accelerated platforms

Using the backface-visibility property causes 2D elements and transforms
to be elevated to a 3D context. Since the only transform being used is
rotate(Xdeg), which is a 2D transform, there is no need to incur the
extra performance penalty.
This commit is contained in:
Chhatoi Pritam Baral 2016-05-29 17:13:29 +05:30
parent a2262695bd
commit 7078fa4452

View file

@ -33,7 +33,6 @@
height: 100%; height: 100%;
z-index: 1000; z-index: 1000;
background: #000000; background: #000000;
backface-visibility: hidden;
& > div { & > div {
display: block; display: block;
position: relative; position: relative;
@ -45,9 +44,7 @@
border-radius: 50%; border-radius: 50%;
border: 3px solid transparent; border: 3px solid transparent;
border-top-color: $danger; border-top-color: $danger;
backface-visibility: hidden;
transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0);
backface-visibility: hidden;
animation: spin 2s linear infinite; /* Chrome, Firefox 16+, IE 10+, Opera */ animation: spin 2s linear infinite; /* Chrome, Firefox 16+, IE 10+, Opera */
&:before { &:before {
content: ""; content: "";