Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 3 commits
  • 7 files changed
  • 0 comments
  • 1 contributor
8  app/assets/stylesheets/general_inapplicable_less_html.css.scss
... ...
@@ -0,0 +1,8 @@
  1
+@import 'include/base';
  2
+
  3
+// some completely extraneous styles that do nothing, but which (RTL) target everything
  4
+@for $i from 1 through 10000 {
  5
+  .random-#{$i} div {
  6
+    width: 1px * $i;
  7
+  }
  8
+}
10  app/assets/stylesheets/mediaqueried_general_inapplicable.css.scss
... ...
@@ -0,0 +1,10 @@
  1
+@import 'include/base';
  2
+
  3
+@media only print {
  4
+  // some completely extraneous styles that do nothing, but which (RTL) target everything
  5
+  @for $i from 1 through 10000 {
  6
+    .random-#{$i} div {
  7
+      width: 1px * $i;
  8
+    }
  9
+  }
  10
+}
2  app/controllers/timings_controller.rb
@@ -18,8 +18,10 @@ def experiments
18 18
       :base => 'One different style per each 10k divs',
19 19
       :class_inapplicable => 'Base, plus 10k styles that apply to non-existent classes',
20 20
       :general_inapplicable => 'Base, plus 10k styles which rightmost target divs',
  21
+      :general_inapplicable_less_html => 'Base, plus 10k styles which rightmost target divs, but only 1k divs',
21 22
       :specific_inapplicable => 'Base, plus 10k styles which rightmost target spans',
22 23
       :namespaced_general_inapplicable => 'Base, plus 10k styles which rightmost target divs, except they cannot apply',
  24
+      :mediaqueried_general_inapplicable => 'Base, plus 10k styles which rightmost target divs, except they cannot apply because of mediaqueries',
23 25
       :one_rule_many_selectors => 'One big rule that targest each of the 10k divs seperately',
24 26
       :one_rule_many_selectors_and_rules => 'The same rule repeated for each of the 10k divs',
25 27
       :big_styles => 'Base, plus 1k styles that have about 10 rules each'
9  app/views/layouts/experiment.html.erb
@@ -19,9 +19,12 @@
19 19
 <body>
20 20
   <script>window.css_timings.body_start = t()</script>
21 21
   
22  
-  <% 10000.times do |i|%>
23  
-    <div class="div-<%= i+1 %>">A div with some basic text inside</div>
  22
+  <% if content_for? :html_content %>
  23
+    <%= yield :html_content %>
  24
+  <% else %>
  25
+    <% 10000.times do |i|%>
  26
+      <div class="div-<%= i+1 %>">A div with some basic text inside</div>
  27
+    <% end %>
24 28
   <% end %>
25  
-  <%= yield %>
26 29
 </body>
27 30
 </html>
5  app/views/timings/general_inapplicable_less_html.html.erb
... ...
@@ -0,0 +1,5 @@
  1
+<% content_for :html_content do %>
  2
+  <% 1000.times do |i|%>
  3
+    <div class="div-<%= i+1 %>">A div with some basic text inside</div>
  4
+  <% end %>
  5
+<% end %>
0  app/views/timings/mediaqueried_general_inapplicable.html.erb
No changes.
2  config/application.rb
@@ -47,7 +47,7 @@ class Application < Rails::Application
47 47
     
48 48
     config.assets.precompile += ['runner.css', 'empty.css', 'base.css',
49 49
       'class_inapplicable.css', 'general_inapplicable.css', 'namespaced_general_inapplicable.css',
50  
-      'specific_inapplicable.css', 
  50
+      'specific_inapplicable.css', 'mediaqueried_general_inapplicable.css', 'general_inapplicable_less_html.css',
51 51
       'one_rule_many_selectors.css', 'one_rule_many_selectors_and_rules.css', 'big_styles.css',
52 52
       'runner.js', 'domready.js']
53 53
     

No commit comments for this range

Something went wrong with that request. Please try again.