Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Class it up

Security covered Under active development 25 sites

Classitup automatically adds CSS classes to your Drupal site based on block and page information. This helps with theming by providing more granular control over styling elements like blocks, custom blocks, and specific content types. Future plans include adding classes for views displays.

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

Drupal 8–11

Ask your assistant about Class it up

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Dec 2025
Latest release
10 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Slowing

Releases

Version Type Core PHP Release date
8.x-1.2 Stable 8–11 Dec 15, 2025