In my particular case I am going to need to replicate the various themes I am offering to my users, simply for the sake of offering them multiple color schemes for each layout.
If it were possible to create alternative css files -- something like themename.alt1.css. themname.alt2.css, etc -- and then extend a rule to state:
IF condition
THEN themename
AND theme_css_file... then I wouldn't have to create whole theme copies for the purpose.
It would multiply the power of the module considerably. And it would considerably reduce the development/maintenance workload.
Of course, this would make the internal code and selection block operation more complex, and would probably require establishing a naming scheme for alternate css files. Not to mention that there would have to be appropriately named images for the various preview images. So it might be more trouble than it's worth on the module coding/maintenance side.
Not that Themekey isn't terrific just the way it stands. This is a truly excellent and useful module.
Comments
Comment #1
mkalkbrennerI'll consider this
Comment #2
miiimoooHi Markus, I would find this functionality really useful too, Or instead something where you add some CSS class to the body tag. Have you done any work on this? Would you accept a patch if I implemented this functionality? And would you have any suggestions or guidelines for an implementation?
Comment #3
mkalkbrennerI didn't start the feature right now. But I will accept patches ;-)
I see two different ways to implement it:
1. Add a kind of text field beside the the theme to select in the rule chain to enter additional sytle sheets which will be added using drupal_add_css().
2. Create a separate rule chain for adding style sheets. Add a new checkbox to every rule to indicate if processing the rule chain should stop or not if a rule matches. This way it's possible to add multiple style sheets with multiple conditions.
Thoughts?
Comment #4
mkalkbrennerShould be implemeted for 7.x first and than backported.
Comment #5
ifish commentedNeed this also.
Comment #6
mkalkbrennerA first experimental implementation has been added to ThemeKey 7.x-3.x. It's wrapped in a sub-module called themekey_css.
http://drupalcode.org/project/themekey.git/commit/86385b4
Comment #7
mkalkbrennerComment #8
mkalkbrenner