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. :-)

Comments

robloach’s picture

Status: Needs review » Reviewed & tested by the community

Reviewed and tested. Works very nicely.

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Needs review

I 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?

Crell’s picture

Gabor: 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?

gábor hojtsy’s picture

Look 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.

robloach’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new30.66 KB

In the attached screenshot, you'll see that garland/style-rtl.css is correctly loaded when using a right-to-left language.

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Needs work

So 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.

robloach’s picture

Status: Needs work » Needs review
StatusFileSize
new2.31 KB

Good point, here's the patch without minnelli-rtl.css.

gábor hojtsy’s picture

Status: Needs review » Fixed

Thanks, committed.

gábor hojtsy’s picture

Status: Fixed » Needs work

I 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.

Crell’s picture

Well 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?

gábor hojtsy’s picture

The 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.

dvessel’s picture

Status: Needs work » Needs review
StatusFileSize
new2.31 KB

Whoops, didn't know this was here.

Sub-theming works fine with maintenance theming, so here's the patch for Minnelli.

robloach’s picture

Status: Needs review » Reviewed & tested by the community

Seems 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.

gábor hojtsy’s picture

Rob 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?

dvessel’s picture

Sry 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.

robloach’s picture

Actually, the credit all goes to Crell and you. I didn't write the patch, I just updated it to HEAD ;-) .

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Committed this one, thanks. I hope we will not find more bugs with this later this time.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.