Architecture Decision Records (ADRs)

← Home

Do not set background color and text color for blocks that would be used in Layout Builder

Introduction

Setting text and background color in blocks may lead to issues when these blocks are placed in layout builder.

Decision

Blocks within layout builder should not have a set background color and text color, they should inherit their colors either from the layout builder section (if specified) or the body element.

Context

Most of the time, this is redundant code. It may result in unneeded additional frontend fixes. Layout Builder sections may have dark background colors which require lighter text colors for the blocks within them. Setting text colors for the blocks makes overriding them by the section style harder and requires more time.

Consequences

Exceptions

Additional Resources

None

← See more ADRs