Provide a way to use styles on both blocks and sections

Created on 10 October 2023, about 1 year ago
Updated 17 May 2024, 7 months ago

Problem/Motivation

I'd like to be able to set a style that can be used on both blocks and sections. Can we make it possible to do both?

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States dave reid Nebraska USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @dave reid
  • πŸ‡ΊπŸ‡ΈUnited States bkosborne New Jersey, USA

    Can you provide a real world use case so I can better understand why?

    The current workaround is just to create the style twice. I assume that's annoying enough for your use case, so I'm curious what it is

  • πŸ‡ΊπŸ‡ΈUnited States richardbporter

    A background color class might want to be applied to a specific block or an entire section.

  • As a followup on real world use cases, I am currently working on a Drupal project, where a color palette has been defined. We need to be able to both create a dashed border, and/or a background color for various content, and styling only fx. blocks is not sufficient.
    This can be exemplified by the following: We have a bunch of custom blocks, which we want to wrap in a dashed border. If we add the dashed border to individual blocks, each of the blocks will be wrapped, which is not the intention, so we need to be able to give the section containing the blocks the dashed border styling.

  • πŸ‡ΊπŸ‡ΈUnited States anilu@ Houston, TX

    I have a similar use case on a decoupled website. We are also using background colors but in this case I need to send the same color variable to the FE to change Layouts and Blocks. For now I am using a Select list for the blocks because I can not apply the color background to specific blocks. On this way, I have background color on blocks for specific use cases and layout builder styles for the layouts.

Production build 0.71.5 2024