Skip to content
Snippets Groups Projects
Commit 5b77caf4 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

changes order of CSS loading #746

This changes the order of how Stylesheets are loaded, loading template
styles *after* the plugin styles to allow template authors to simply
override those styles.

darcs-hash:20060317185142-7ad00-ac3f36a801babbbc09115124fa1472ee7470047e.gz
parent 901c1c87
No related branches found
No related tags found
No related merge requests found
......@@ -48,22 +48,21 @@ function css_out(){
// are needed to fix relative paths in the stylesheets
$files = array();
if($print){
$files[DOKU_TPLINC.'print.css'] = DOKU_TPL;
if (isset($tplstyles['print'])) $files = array_merge($files, $tplstyles['print']);
// load plugin styles
// load plugin, template, user styles
$files = array_merge($files, css_pluginstyles('print'));
if (isset($tplstyles['print'])) $files = array_merge($files, $tplstyles['print']);
$files[DOKU_CONF.'userprint.css'] = '';
}else{
$files[DOKU_INC.'lib/styles/style.css'] = DOKU_BASE.'lib/styles/';
if($conf['spellchecker']){
$files[DOKU_INC.'lib/styles/spellcheck.css'] = DOKU_BASE.'lib/styles/';
}
// load plugin, template, user styles
$files = array_merge($files, css_pluginstyles('screen'));
if (isset($tplstyles['screen'])) $files = array_merge($files, $tplstyles['screen']);
if($lang['direction'] == 'rtl'){
if (isset($tplstyles['rtl'])) $files = array_merge($files, $tplstyles['rtl']);
}
// load plugin styles
$files = array_merge($files, css_pluginstyles('screen'));
$files[DOKU_CONF.'userstyle.css'] = '';
}
......@@ -192,7 +191,8 @@ function css_filetypes(){
// default style
echo 'a.mediafile {';
echo ' background: transparent url('.DOKU_BASE.'lib/images/fileicons/file.png) 0px 1px no-repeat;';
echo ' padding-left: 16px;';
echo ' padding-left: 18px;';
echo ' padding-bottom: 1px;';
echo '}';
// additional styles when icon available
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment