This project is not covered by Drupal’s security advisory policy.

Stylesheets by Path provides a mechanism to define stylesheets to be loaded when a specified path or alias is triggered.
The module is intended to be used by theme developers because it operates with the theme's .info file.
It provides a new property: path-stylesheets, example:

path-stylesheets[path][media][] = path/to/css/file/to/load/when/the/path/is/triggered

The module doesn't provide any configuration interface, which means it works immediately after enabling it.

I used http://api.drupal.org/api/function/drupal_match_path/6 to trigger the stylesheets. This function (with a little more work) will bring greater flexibility in the choice of the trigger.
Example:

path-stylesheets[node,^node*edit][media][] = path/to/css/file

The above rule will insert the CSS file in all node and node/* pages but it will not include the file for node editing pages.

This project is sponsored by Media Group Srl.

Project information

Releases