Active
Project:
IE Unlimited CSS Loader
Version:
6.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
15 Jul 2010 at 12:24 UTC
Updated:
26 May 2011 at 18:01 UTC
Right now (1.2 version), unlimited_css will use @import instead of <link> if the number of stylesheets is bigger than 22.
Someone (=mikeytown) suggested to make this number configurable via an admin form (see #652690-9: Only process CSS if the browser is IE).
I think it is worth to discuss this, before we move on.
Comments
Comment #1
donquixote commentedWe should finish #855040: A bit of refactoring to make future work easier. first.
Comment #2
donquixote commentedOne idea I had about the magic number:
I think an admin form is probably not the best idea to set this number.
It could make more sense to set the number directly in page.tpl.php - this is the place where we know best how many hardcoded stylesheets we use. Unless it's a 3rd party theme.
This is how I imagine this to work:
- Instead of a html string, we set $vars['styles'] to be an object with a __toString() method and a render($magic_number) method or a setMagicNumber($magic_nunber) method.
- In page.tpl.php, you can then write
print is_object($styles) ? $styles->render(25) : $styles;.Alternatively, you can do in themename_preprocess_page:
Maybe this could even be combined with a variable_get() thing..
Of course this only works with PHP 5.x, but we could add a fallback for PHP 4.
All that said, I'm not sure if this is really relevant.
We should also keep in mind that every new admin setting means added complexity, and needs to be considered for upgrade and downgrade.
Comment #3
klonosYes, either that, or expose it as a per-theme setting (which I kinda lean towards).
Comment #4
donquixote commentedIt would be interesting to know if we are trying to solve a real-world problem, or just something hypothetical. I can personally live quite well with the number 22. What do you think?