How to enhance the unpublished view of a node
Use the Asset Injector module and a few lines of CSS to visually distinguish unpublished nodes in Drupal.
Step 1: Install Asset Injector
Install the Asset Injector module.
Step 2: Configure CSS
admin/config/development/asset-injector/css→ + Add CSS Injector- Name: "Unpublished", check Enabled, paste:
.node--unpublished {
background-color: transparent;
border-left: solid 3px orange;
padding-left: 15px;
}
.gin--dark-mode li.entity-moderation-form__item,
.gin--dark-mode li.entity-moderation-form__item label { color: black; }
- Under Conditions, select applicable content types → Save