Module CSS files

edited July 2011 in Modules
Enjoying using Fuel CMS, thanks again for this cool software.

I noticed the css files for every module are loaded regardless of which module is being used. If I make an advanced module, the css files for the blog and user guide modules are loaded as well.

I know it is because some of the css rules are used on every page like the icons. The downside is that if I create 10 advanced modules, then 10 extra css files are loaded on each request. I think it would be cool if each module had an icon.css file or something like that contained rules that are loaded by all modules. The file will contain only a few rules and it can be cached with the other module icon.css files.

Each module would also have another css file that was only loaded when using that module, and the file name could be the module name like it is now, or specified in the config file.

I totally understand why it is done the way it is now and it does keeps things simple. But it would lessen the amount of css rules loaded (especially if using a bunch of advanced modules) if there were two css files for each module. One that was loaded with all pages and one that was loaded only when using that module.

Just some thoughts, thanks.

Comments

  • edited 12:14PM
    This won't solve the problem completely, but there is an "xtra_css" fuel config parameter that you could set that includes all your icon css. You could then remove the module specific CSS for those modules that only use the CSS for the icons. This would only work for those advanced modules that don't have any other CSS that needs to be loaded for it.

    Regardless, your point is duly noted, and we'll put it on the list.
  • edited 12:14PM
    Thanks for the reponse. I respect your dedication.
  • edited 12:14PM
    yes admin, thanks. I just wanted to say i agree with @parlays 's suggestion
Sign In or Register to comment.