Include multiple css files in a theme

342
Defect
dyron
-
3.2
-
-
Fixed
Normal
Normal
4 years ago
3 years ago
0

Description

What did you do to cause this?

Creating a new Theme.

What page were you on?

/css.php is included in all files.

Describe the defect:

You can't define multiple theme files within HTML::css_link(Request::base() . 'css.php?css=screen&theme=' . settings('theme')); while the css.php offering an explode on $_REQUEST['theme']. The $_REQUEST['theme'] is used as directory name, so the explode has to run on another $_REQUEST variable, e.g. $_REQUEST['theme_files']. Otherwise the theme could be loaded from the config/settings, then you can use multiple theme css files.

Ticket History

4 years and 7 months ago by dyron

Possible solution

Remove the unnessecary explode loop, if only the theme name should be used. Or introduce another QS variable for multiple files.

4 years and 7 months ago by Jack

  • Closed ticket as Fixed

I've added the theme_files query string variable, if unset it will use default, otherwise separate multiple files with a comma like so:
css.php?theme=my_theme&theme_files=normalize,my_theme.