[pmwiki-users] problem with @import css rules when going through php

Patrick R. Michaud pmichaud at pobox.com
Sat Aug 6 02:17:05 CDT 2005

On Fri, Aug 05, 2005 at 05:40:15PM -0400, Bronwyn Boltwood wrote:
> I have a weird problem on my hands and I will understand perfectly if
> nobody has any ideas for solving it.  That said, I sure hope you folks
> will have some ideas! :)
> While rewriting the css files for my Pukka skin, I discovered that
> @import rules in css files don't work when the css file gets included
> by the stitch.php file.  The stitch file looks something like this:
> 	<?php
> 		header('Content-type: text/css');
> 		#include("css/layout-abpos-sb15em.css");
> 		#include("css/layout-abpos-sb22em.css");
> 		include("css/layout-abpos-sb28pct.css");
> 		#include("css/layout-abpos-sb33pct.css");
> 		include("css/layout-abpos-leftsb.css");
> 		#include("css/layout-abpos-rightsb.css");
> 	?>

The CSS syntax says that any @import rules must appear at the
very beginning of a style sheet, before any other rules.  
See http://www.w3.org/TR/CSS21/cascade.html#at-import .

The stitching above combines .css files into a single style sheet,
so if layout-abpos-sb28pct.css has any non- at import rules in it
then layout-abpos-leftsb.css cannot have any @import rules.

Does this help?


More information about the pmwiki-users mailing list