Style utilities: how can it revolutionize Drupal Core rendering

Salle Amphi "Bleu de Sassenage" Auditoire Découverte Time Slot Jeudi 16:00 - 16:40 (09/04/2026)
Description

After SDC in 2023 for UI Components and the Icon API in 2024, having an API to make Drupal understand and use style utilities is in continuity of making Drupal a design system native CMS.

In design systems, styles may have many names:

  • styles
  • utilities
  • helpers
  • fundamentals

Most of the time, a style is a CSS class to apply to any element but it can be applied with other ways.

There are multiple contrib modules allowing to declare and apply classes, for examples:

Some have chosen to declare styles with code, others in config. Some covers specific usage: Block only, Layout Builder only, etc. The ecosystem is fragmented and a lot of efforts are duplicated to cover the different usages.

This is the occasion for improvements for frontend developers, backend developers and site builders:

  • frontend developers will be able to declare the styles they provide and document how to use it
  • easier usage in Twig
  • a style library to instantly see the styles available
  • remove friction, why some styles are available with one contrib module and not with another one. And no more need to enter classes manually
  • styles can have a lifecycle and be deprecated
Durée de la conférence
40 min
Pré-requis (concepts ou connaissances particulières à connaître)

No hard prerequisites but being familiar with those concepts may help:

  • Design Systems methodology
  • Drupal attributes object
  • attributes in render array
Ce que le public aura appris après avoir assisté à cette conférence
  • What is a style in terms of design system?
  • What are the benefits compared with current methods?
  • How to declare it?
  • How to use it in render array?
  • How to use it in Twig?
  • How to use it in admin UI?

Présenté par

Florent Torregrosa

Autres sessions au même moment

Au secours, on me demande d’utiliser de l’IA !

Amphi "Gratin Dauphinois" | by pocky