Permalink
Browse files

Added a test with less HTML

  • Loading branch information...
tmeasday committed Mar 2, 2012
1 parent 332d2e7 commit af915a0b7c0d71bb05cffbfefe9949fc45ac5775
@@ -0,0 +1,8 @@
+@import 'include/base';
+
+// some completely extraneous styles that do nothing, but which (RTL) target everything
+@for $i from 1 through 10000 {
+ .random-#{$i} div {
+ width: 1px * $i;
+ }
+}
@@ -18,6 +18,7 @@ def experiments
:base => 'One different style per each 10k divs',
:class_inapplicable => 'Base, plus 10k styles that apply to non-existent classes',
:general_inapplicable => 'Base, plus 10k styles which rightmost target divs',
+ :general_inapplicable_less_html => 'Base, plus 10k styles which rightmost target divs, but only 1k divs',
:specific_inapplicable => 'Base, plus 10k styles which rightmost target spans',
:namespaced_general_inapplicable => 'Base, plus 10k styles which rightmost target divs, except they cannot apply',
:mediaqueried_general_inapplicable => 'Base, plus 10k styles which rightmost target divs, except they cannot apply because of mediaqueries',
@@ -19,9 +19,12 @@
<body>
<script>window.css_timings.body_start = t()</script>
- <% 10000.times do |i|%>
- <div class="div-<%= i+1 %>">A div with some basic text inside</div>
+ <% if content_for? :html_content %>
+ <%= yield :html_content %>
+ <% else %>
+ <% 10000.times do |i|%>
+ <div class="div-<%= i+1 %>">A div with some basic text inside</div>
+ <% end %>
<% end %>
- <%= yield %>
</body>
</html>
@@ -0,0 +1,5 @@
+<% content_for :html_content do %>
+ <% 1000.times do |i|%>
+ <div class="div-<%= i+1 %>">A div with some basic text inside</div>
+ <% end %>
+<% end %>
View
@@ -47,7 +47,7 @@ class Application < Rails::Application
config.assets.precompile += ['runner.css', 'empty.css', 'base.css',
'class_inapplicable.css', 'general_inapplicable.css', 'namespaced_general_inapplicable.css',
- 'specific_inapplicable.css', 'mediaqueried_general_inapplicable.css',
+ 'specific_inapplicable.css', 'mediaqueried_general_inapplicable.css', 'general_inapplicable_less_html.css'
'one_rule_many_selectors.css', 'one_rule_many_selectors_and_rules.css', 'big_styles.css',
'runner.js', 'domready.js']

0 comments on commit af915a0

Please sign in to comment.