Download & Extend

Only add css when required

Project:Date
Version:6.x-2.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Is it possible for date to only call drupal_add_css when they are required, rather than every single page load as is currently done in hook_menu?

Comments

#1

Status:active» closed (works as designed)

This is not a 'bug', it's by design so that the css can be aggregated.

#2

How about if (variable_get('preprocess_css', FALSE)) { /* load the css */ } otherwise check when it is actually needed. I'm sick of having over 31 stylesheets from modules like this and not being able to easily test IE

#3

Title:only add css when required» Only add css when required
Version:5.x-2.5» 6.x-2.x-dev
Category:bug report» feature request
Status:closed (works as designed)» active

It turned out that always loading CSS is not a good idea and it was fixed in 7.x-2.x. Would we backport it to 6.x? I mean whether patch will be accepted?