diff options
author | Anika Henke <anika@selfthinker.org> | 2012-04-09 14:15:29 +0100 |
---|---|---|
committer | Anika Henke <anika@selfthinker.org> | 2012-04-09 14:15:29 +0100 |
commit | 6c47a78cc56b2c460658675c694bd178c31a1830 (patch) | |
tree | 18bb56f536579c0a902fd2606c4c590c9d6f1f6c /inc/template.php | |
parent | 0607bfee2c4334d31415541abb89026e77c7628a (diff) | |
download | rpg-6c47a78cc56b2c460658675c694bd178c31a1830.tar.gz rpg-6c47a78cc56b2c460658675c694bd178c31a1830.tar.bz2 |
load only one stylesheet for all modes instead of three
Instead of three stylesheets for 'all', 'screen' and 'print' modes, they are all loaded into a single stylesheet by wrapping all screen styles in a "@media screen {}" and all print styles in a "@media print {}". The 'all' mode is not wrapped in anything.
Potential issues with existing CSS: If any of your screen or print CSS files already contain any "@media" syntax, the CSS will probably break. In that case please add any CSS with "@media" in it to the 'all' mode instead!
Also, the 'rtl' mode is hereby deprecated. Please just prefix any RTL styles within your normal CSS files with "[dir=rtl]". This also fixes that RTL styles cannot be added for 'all' or 'print' modes.
Diffstat (limited to 'inc/template.php')
-rw-r--r-- | inc/template.php | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/inc/template.php b/inc/template.php index ab6aa925f..131f34020 100644 --- a/inc/template.php +++ b/inc/template.php @@ -354,12 +354,8 @@ function tpl_metaheaders($alt=true){ } // load stylesheets - $head['link'][] = array('rel'=>'stylesheet', 'media'=>'screen', 'type'=>'text/css', + $head['link'][] = array('rel'=>'stylesheet', 'type'=>'text/css', 'href'=>DOKU_BASE.'lib/exe/css.php?t='.$conf['template'].'&tseed='.$tseed); - $head['link'][] = array('rel'=>'stylesheet', 'media'=>'all', 'type'=>'text/css', - 'href'=>DOKU_BASE.'lib/exe/css.php?s=all&t='.$conf['template'].'&tseed='.$tseed); - $head['link'][] = array('rel'=>'stylesheet', 'media'=>'print', 'type'=>'text/css', - 'href'=>DOKU_BASE.'lib/exe/css.php?s=print&t='.$conf['template'].'&tseed='.$tseed); // make $INFO and other vars available to JavaScripts $json = new JSON(); |