Closed (won't fix)
Project:
Rules
Version:
7.x-2.x-dev
Component:
Rules Core
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
9 Feb 2012 at 20:04 UTC
Updated:
7 Mar 2019 at 06:03 UTC
Jump to comment: Most recent
Comments
Comment #1
mitchell commentedComment #2
plato1123 commentedAnyone know if rules can add css?
Comment #3
tr commentedYes, that's going to be true for rules triggered by any event except "Drupal is initializing".
I don't think it makes sense to use Rules to add CSS or JavaScript. There are better ways and better places in Drupal to control the page appearance. I don't know your exact use case, but think about adding classes to the tags on a page so that they may be styled differently based on EXISTING CSS, rather than adding new CSS. This can be done in the theme layer, using templates, theme functions overrides, etc.