Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
Minnelli theme
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
8 Oct 2007 at 00:38 UTC
Updated:
18 Dec 2007 at 21:31 UTC
Jump to comment: Most recent file
Now that the theme info files support multiple stylesheets per theme with overriding, there's no need for minnelli to have an @import statement in its CSS file. By just renaming the file, we get garland's style.css by magic in a way that's more polite to the CSS compressor, too. And it serves as an in-core demo of how to do nested theme CSS. Score. :-)
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | minnelli_cascade.patch | 2.31 KB | dvessel |
| #7 | minnelli_1.patch | 2.31 KB | robloach |
| #5 | minelli.png | 30.66 KB | robloach |
| minnelli.patch | 2.75 KB | Crell |
Comments
Comment #1
robloachReviewed and tested. Works very nicely.
Comment #2
gábor hojtsyI do not have time now to check for the RTL version, but it might not work from what I think now. AFAIK, RTL CSS files are looked up from the same directory, so style-rtl.css might not be included this way. Care to test?
Comment #3
Crell commentedGabor: Might not work for Minnelli in particular, or you don't think the inherit will work for any RTL stylesheet? Big difference. I admit to being not up on the RTL changes yet. Are there docs for that yet?
Comment #4
gábor hojtsyLook at how drupal_add_css() adds RTL sheets and/or try whether adding an RTL language using Minnelli loads in Garland's style-rtl.css too.
Comment #5
robloachIn the attached screenshot, you'll see that garland/style-rtl.css is correctly loaded when using a right-to-left language.
Comment #6
gábor hojtsySo then, if Drupal itself figures it out that the Garland style-rtl.css should be added to the page, there is absolutely no need for the empty minelli-rtl.css as added by this patch, because it has no use as far as I see.
Comment #7
robloachGood point, here's the patch without minnelli-rtl.css.
Comment #8
gábor hojtsyThanks, committed.
Comment #9
gábor hojtsyI realized a few minutes ago that I actually did not remove style.css and style-rtl.css with this commit. After I removed and tried to test something else, it turned out that this broke the maintenance pages (install, update). The maintanance.tpl.php file in misc tries to directly load the style.css from the theme, which is not there after this patch in Minnelli. It would be quite ugly to use minnelli.css instead, as it would tie the "generic" tpl.php to Minnelli. The theme_maintenance() function and its friend theme_install_page() has Minnelli specific details, so it could add the minnelli.css, but that does not help of course, as it does not make the garland style.css available (as we depend on the CSS fallback discovery with this patch, and that does not work there), so we would need to add garland's style.css manually. I am not sure this would look nice... Anyway, as with this patch, Drupal is clearly broken, I needed to roll it back.
Comment #10
Crell commentedWell that sounds messy indeed. Isn't the root problem, though, that theme_maintenance() and company are still hard-coded for styles.css, when the rest of the system is not?
Comment #11
gábor hojtsyThe root of the problem is that they are hard coded for style.css and that they don't run the usual CSS detection code as themes do.
Comment #12
dvessel commentedWhoops, didn't know this was here.
Sub-theming works fine with maintenance theming, so here's the patch for Minnelli.
Comment #13
robloachSeems to be the same as the one I posted. This patch works as expected. When using a right-to-left language, it imports Garland's style-rtl.css without any problems... What I'm concerned with, however, is the issue that Gábor brought up earlier.
Comment #14
gábor hojtsyRob Loach: The maintenance theming changed since I originally committed this issue, so if your *testing* shows that it still works with the new patch applied to the newest dev version, then we are fine. Did you test?
Comment #15
dvessel commentedSry Rob. Wasn't sure yours would apply and I already had the patch. :) They are pretty much the same and you were here first so credit to Rob.
Looks like it's ready to go in.
Comment #16
robloachActually, the credit all goes to Crell and you. I didn't write the patch, I just updated it to HEAD ;-) .
Comment #17
gábor hojtsyCommitted this one, thanks. I hope we will not find more bugs with this later this time.
Comment #18
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.