Created
March 10, 2013 21:54
-
-
Save tommeier/5130647 to your computer and use it in GitHub Desktop.
Speed up specs by disabling both jQuery effects and CSS transformations
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
<% if Rails.env.test? %> | |
<%= content_for :head do %> | |
<style type="text/css"> | |
.notransition * { | |
-webkit-transition: none !important; | |
-moz-transition: none !important; | |
-o-transition: none !important; | |
-ms-transition: none !important; | |
transition: none !important; | |
} | |
</style> | |
<% end %> | |
<script type="text/javascript"> | |
$.fx.off = true; | |
$('body').addClass('notransition'); | |
</script> | |
<% end %> |
Would it be the same if you changed line 4 to "* {" and removed line 16?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Further explanation : http://venombytes.com/2013/03/11/faster-browser-specs