Please fix the Flash of Unstyled Content that occurs in Drupal.

Reference this forum thread in which Dries comments on the subject.

http://drupal.org/node/view/2717

Comments

al’s picture

Title: Flash of Unstyled Content » Flash of Unstyled Content in xtemplate theme

Note that this is only for the xtemplate theme. Updating title accordingly.

Eric Scouten’s picture

Assigned: Unassigned » Eric Scouten

This is easily fixed by using <link type="text/css" rel="stylesheet" href="themes/xtemplate/xtemplate.css" /> instead of <style type="text/css" media="all">
@import url(themes/xtemplate/xtemplate.css);
</style>

I'll submit a patch to that effect.

gábor hojtsy’s picture

Eric, the @import is intended usage, as this way the CSS will not be loaded by crappy old browsers not supporting the features used in the file (Netscape 4 is an example).

Eric Scouten’s picture

Submitted patch #151. Need someone with CVS permissions to commit the change.

Eric Scouten’s picture

Patch #151 has proven to be rather controversial. (See discussion on drupal-devel not posted here.) ;-)

Submitted patch #152 to restore @import semantics for style sheets. Now attempting to fix by using an empty script block instead.

Bèr Kessels’s picture

Also @import has a bug in IE 5.
IE5 on win ( a vaast amount of users, unfortunately) ignores the media="" elements. So writing a styelsheet for printers will give very strange visual effects too.

Ber

sandeep-1’s picture

Adding this just before the <style> tag works for me...

<!-- to correct the unsightly Flash of Unstyled Content. http://www.bluerobot.com/web/css/fouc.asp -->
<script type="text/javascript"></script>

moshe weitzman’s picture

killes@www.drop.org’s picture

Still an issue for pushbutton.

Steven’s picture

This was fixed in 4.5/CVS for bluemarine and pushbutton.

Anonymous’s picture