What it does.
Body node ID class adds predictable CSS hooks to individual node pages. It exposes both the node’s identifier and its content type on the page body, making targeted styling possible without adding page-specific template logic.
The module restores a behavior familiar from Drupal 7. After enabling it and clearing caches, a theme can target one node through its ID class or apply a shared treatment to every node in the same content type.
Capabilities.
- A body class for the current node ID
- A body class for the current content type
- Page-specific CSS targeting
- No configuration form required
Using the module.
- Enable the module and clear caches.
- Use page-node-{nid} or page-node-type-{bundle} selectors in the theme.
Our contribution.
Conceived, designed and implemented the module.
This records WS’s contribution to this community project, alongside its other contributors. View the organization’s supported projects ↗