Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Varbase FAQs 9.2.1 Minor update available for module varbase_faqs (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Extra CSS UI

No security coverage
View on drupal.org

This module provides a user-friendly interface for administrators to add or override site-wide CSS rules directly within the Drupal administration area. The CSS is safely stored, sanitized, and served as a dedicated CSS file that loads after your theme's stylesheets, ensuring your customizations are applied correctly without modifying code files.

Provides a secure, admin-friendly interface to add site-wide CSS additions and overrides directly through the Drupal UI.

This module allows site administrators to add/override CSS rules without touching code or theme files.

The CSS is stored in configuration, sanitised for safety, and served as a proper `.css` file that loads after all theme CSS, ensuring your overrides take effect reliably.

Features

- Add and override site-wide CSS directly in the Drupal admin interface.
- Clean UI with syntax highlighting (CodeMirror-based).
- Safe sanitisation that strips harmful protocols and, optionally, `@import` statements.
- Output served as a proper `.css` file (cached, CDN-safe).
- Configurable theme, library, and filename integration; works with any theme.
- Loads after the theme’s main stylesheet, preserving CSS cascade order.
- No database hacks, no extra custom fields/logic, no inline styles.

Installation

Install and enable the module as usual:

 composer require drupal/extra_css_ui
   drush en extra_css_ui
   drush cr

Post-Installation

Visit the module's admin page at `/admin/config/development/extra-css-ui` (Configuration > Development > Extra CSS UI), open the 'Configuration' fieldset and configure the following settings:

a. Frontend theme: Select the theme you want to apply this CSS too.

b. Theme library name: Select the name of the library in the theme's *.libraries.yml* file that includes your final CSS. (Typically this is global-styling but can eb different in some cases)

c. Filename: Enter the filename you want to use for your CSS. (This just changes the filename output in the source code)

d. Sanitise `@import` statements: Check this box to strip `@import` statements from your CSS.

e. Maximum size (KB): Set the maximum filesize allowed for the CSS file. Additional CSS will be truncated if the file size exceeds this limit.

f. Save settings via the 'Save configuration' button.

Similar projects

This module provides some similar functionality to Critical CSS UI but in a more simplistic, less-targeted, site-wide way.

Activity

Total releases
1
First release
Dec 2025
Latest release
7 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Slowing

Releases

Version Type Release date
1.0.0 Stable Dec 12, 2025