Use hook_process_node() instead of CSS.