Problem/Motivation
The ui_suite_uswds_grace_life_church theme currently lacks standard contextual body classes on the element. Classes such as user-logged-in, path-frontpage, and content-type specific classes (e.g., page-node-type-article) are missing. These classes are standard in Drupal core themes (like Olivero) and are essential for page-specific and context-aware CSS styling.
Steps to reproduce
1. Enable the ui_suite_uswds_grace_life_church theme.
2. Navigate to the homepage or any specific content node.
3. Inspect the HTML source and locate the tag.
4. Observe that standard classes like path-frontpage, user-logged-in (if logged in), or page-node-type-[type] are not present.
Proposed resolution
Update html.html.twig to include logic that generates and renders these standard body_classes.
The added classes include:
* user-logged-in: When the user is authenticated.
* path-frontpage: On the homepage.
* path-[root_path]: Based on the current path (e.g., `path-user`, `path-node`).
* page-node-type-[node_type]: On node pages, indicating the content type.
* db-offline: When the database is unavailable.
Remaining tasks
* None
User interface changes
The HTML element will now have additional CSS classes. No visible visual changes will occur immediately unless existing CSS targets these new classes.
API changes
None.
Data model changes
None.
Issue fork ui_suite_uswds-3564904
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
circuitcipher commentedI might have to wait to push these changes as apparently git.drupal.org is being DDOS'ed.
Comment #4
circuitcipher commentedComment #5
smustgrave commentedLittle concerned this wasn't there when I used the starterkit generator from core. But completely fine with this.