Created
April 9, 2015 16:12
-
-
Save XOP/ef8f2ade592d130f9bc3 to your computer and use it in GitHub Desktop.
GPU render stylus mixin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// render in separate layer | |
// hack to balance CPU/GPU load | |
// usage gpuRender(chrome, mac-chrome) | |
gpuRender($browsers){ | |
$i = 0; | |
$comma = ","; | |
$rule = ""; | |
for $b in arguments { | |
$i += 1; | |
if ($i == length(arguments)){ | |
$comma = ""; | |
} | |
$rule += unquote(".") + $b + unquote(" &") + unquote($comma); | |
} | |
{$rule} { | |
backface-visibility: hidden; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment