[pmwiki-users] Group css and action=print

Petko Yotov 5ko at 5ko.fr
Sat Jun 26 08:29:06 CDT 2010


On Friday 25 June 2010 22:38:13, Daniel wrote :
> I have created some group specific styles by creating a css file in
>  pub/css/ Since then the ..?action=print css does not function properly.
> It looks like first print.css is called, and then the css-file in
> pub/css is called, overruling the print.css

Hello. This is the standard behavior -- group- and page-specific css files 
should be able to override site-specific css files. 

> How do I make print.css behave as it should, when I use group-specific
> css-files?

You can create your own print skin -- for example copy the pub/skins/print 
directory to another name, say "print2" and set in config.php such a line:
  $ActionSkin['print'] = 'print2';

Then, edit the print template and css files -- you can permute the lines 
<!--HTMLHeader--> and <link rel='stylesheet' .../> (the Group.css file is 
inserted in the place of HTMLHeader.) Or, in your new print.css file, you can 
add "!important" to the lines which you don't want to be overridden by group 
css files, like this:
  body { background-color: white !important; }

It is recommended to create a new print skin and not to modify the existing 
one, that way if some day you upgrade, your changes will be preserved.

Thanks,
Petko



More information about the pmwiki-users mailing list