Since upgrading to RC1 and RC2, the stylesheets are imported in the wrong order. The theme's stylesheet should be at the bottom so that it can override any module stylesheets. Instead the theme's stylesheet is at the top of the list, with all module stylesheets following...

Comments

killes@www.drop.org’s picture

I can't confirm this.

q0rban’s picture

http://www.thejettisonparty.com/

basic phptemplate theme running 4.7RC2

It cascaded properly before RC1

killes@www.drop.org’s picture

Might be theme specifc. It works fine on drupal.org and for bluemarine on localhost.

q0rban’s picture

Breaks for pushbutton and bluemarine as well on my site..

q0rban’s picture

I don't know.. drupal.org looks broken to me too... I'm sure the cascading order doesn't matter for drupal.org, though, since probably each modules css has been customized for it.

<s tyle type="text/css" media="all">@import "/themes/bluebeach/style.css";</s tyle><s tyle type="text/css" media="all">@import "/modules/codefilter/codefilter.css";</s tyle><s tyle type="text/css" media="all">@import "/modules/project/project.css";</s tyle><s tyle type="text/css" media="all">@import "/modules/simplenews/simplenews.css";</s tyle>

shouldn't @import "/themes/bluebeach/style.css"; be at the end of the list?

If I look on the wayback machine (unfortunately the last one to view is april '05 or something), it looks like bluebeach's style sheet is the last in the list..

The only reason I noticed it is because after upgrading to RC1, I had to go into my theme's stylesheet and put !important in every nice_menus.css rule I wanted to override.

tenrapid’s picture

The theme's stylesheet is added to the static $styles array in theme_add_style() when init_theme() is called. Normally this happens the first time a theme('...', ...) function is called. So if all modules add their .css file via theme_add_style() BEFORE init_theme() is called then everything is in order.

A module that calls init_theme() breaks this order. On your site this is the case with the acidfree.module. It does this to get the theme's path and to look there for a acidfree.css file that will be used instead of the one in modules/acidfree.

killes@www.drop.org’s picture

Status: Active » Closed (won't fix)

thanks tenrapid.

q0rban’s picture

Status: Closed (won't fix) » Active

Why is drupal.org's css cascading out of order? And why did this only happen after upgrading to 4.7RC1?

q0rban’s picture

Status: Active » Closed (won't fix)

woops.

q0rban’s picture

Title: Style sheet cascading is out of order » Style sheet cascading is out of order after enabling
Project: Drupal core » Acidfree Albums
Version: 4.7.0-rc1 » master
Component: theme system » Code
Status: Closed (won't fix) » Closed (duplicate)

Thanks tenrapid, that was indeed the problem.. Submitted a patch to acidfree.

http://drupal.org/node/57876