I suggest to create virtual directory for style resources instead of linking to style. For example, instead of styles/prosilver/theme/foo.png link to style.php/prosilver/theme/foo.png
What are advantages of doing that?
- Template inheritance could be applied to all style files. Style authors won't need to copy css/images from parent style.
- CSS could be parsed to include imported CSS files, reducing number of HTTP requests.
- Links to mod-specific files would be integrated seamlessly, making it look like file is in style.
- CSS and JS files could be parsed with template engine, allowing to:
- Use conditional statements.
- Use template hooks, allowing to add content to CSS/JS files.
- Include language constants in JS files instead of putting them in overall_footer, reducing size of pages.
- CSS and JS files could be minimized and cached