Skip to content

UI Styles

Stephen Mustgrave edited this page Aug 8, 2024 · 2 revisions

One module part of the UI Patterns ecosystem is UI Styles

Allows developers to define styles from modules and themes and site builders to use them from Drupal admin interface.

The styles are:

  • collections of mutually exclusive, self-descriptive, single-purpose CSS classes. Examples: Typography, Borders, Background colors, Spacing....
  • commonly used in design systems, and can also be called "helpers", "utilities", "fundamentals"...
  • Drupal plugins, created and managed by the themer, inside a single YML file.

ui_styles_2023

The module contains several sub-modules for different integrations

UI Styles Block - on block titles, block content and block wrappers

ui_styles_block

UI Styles CKEditor 5 - as inline class and as block class

ui_styles_ckeditor5

UI Styles Entity Status - on unpublished entities.

ui_styles_entity_status

UI Styles Layout Builder - on block titles, block content, block wrappers, sections and sections' regions. It works also with layout builder overrides (custom layout for a content entity).

ui_styles_layout_builder

UI Styles Library

Uploading Screenshot 2024-08-08 at 12.11.37 PM.png…

UI Styles Page - Themes regions. Note that if you have a region's Twig template not using the attributes variable it will not work.

ui_styles_page

UI Styles View - on view wrappers ("view styles"), exposed forms and pagers.

ui_styles_views

Notes