We are ready to add a new API in Core: ✨ Add a style utility API Active
After SDC in Drupal 10.1 (July 2023), and the Icon API in Drupal 11.1 (Dec 2025), and the upcoming ✨ Add a CSS variables API Active , it will be part of the implementation of design systems APIs in Core, in order to be able to build business agnostic, shareable, Drupal themes, providing design implementations which can be leveraged by display building tools like Layout Builder.
So, we believe this API will be interesting for Layout Builder Styles and here is a prototype of how to use it.
We keep the 2 config entity types:
LayoutBuilderStyleGroup which are similar to Core's Style pluginsLayoutBuilderStyle which  are similar to specific options in the Style pluginsWe change LayoutBuilderStyleGroup to allow to "link" a group to a style plugin.
We change LayoutBuilderStyle to allow to "link" a style to a style plugin's option. When there is such a link:
We add an "Import" entity form to create LayoutBuilderStyle (and LayoutBuilderStyleGroup if necessary directly from Style plugins)
Out of scope of this prototype::
Drupal\Component\Plugin\LazyPluginCollection instead of just storing a stringThis prototype is adding the Core API as an upstream of Layout Builder Style: we create LayoutBuilderStyleGroup and LayoutBuilderStyle from the plugins and we rely on the Layout Builder Style to process the styles.
Another way would be to do the opposite:  Derive style plugins from the LayoutBuilderStyleGroup and LayoutBuilderStyle config entities and rely on Core's API to process the styles.
Yes, an additional page and some additional information in entity forms and entity lists.
Only additions. Doesn't change the behaviour of existing APIs.
Each config entity has a new exportable property.
Active
2.1
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
No activities found.