This project provides classes based on information Drupal knows about.
We will try to follow Drupal's CSS guidelines.
Currently it offers:
- region machine names as classes on blocks
- block type as classes on custom blocks
- page--content-item class pages with a standalone full content item (node).
- page--content-item--[content-type] (node bundle) class to standalone full content item (node) pages.
And plans:
- view display machine names on views
Please make your own suggestions or requests!
Exactly what classes it provides is liable to change until a release candidate or at least a stable release is reached. Until then (and after!) feel free to mine it for examples of preprocessors you can put in your own theme.
Note that the Classy core theme does not provide any preprocessors, and adds all of its themes through templates. By contrast, this extension adds classes which will be added to the attributes core-respecting template output anyway. This reduces the need for templates that differ only in the classes they add (though we absolutely suggest templates as the answer to most of the world's problems).
Class it up is meant to be required by themes, whether custom or contrib, which will be enforceable when this core issue finally lands: #474684: Allow themes to declare dependencies on modules
See also
- Template suggester
- Field Formatter Class module — recommended to add custom classes to your fields, so we do not intend to add the half-dozen classes we could automatically add to fields in Class It Up.
Project information
- Module categories: Developer Tools
- Ecosystem: CSS
- 10 sites report using this module
- Created by mlncn on , updated
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
Revert 'code cleanup' changes that broke things.
Development version: 8.x-1.x-dev updated 10 Nov 2022 at 22:28 UTC