Dashboards CSS impacting other elements using layout builder

Created on 13 June 2024, 5 months ago
Updated 26 August 2024, 3 months ago

Problem/Motivation

I've noticed that some styles added by the module can impact elements of the site built with laypout builder, that are not using Dashboards.

For example: I've found .layout--twocol-section.layout--twocol-section--50-50 being defined in dashboard.css:61. This rule is adding gap and flex settings and it changed the look of other two-column section on my site. And this is despite the fact that when adding section in layout builder, I've chosen "Two column" layout and not "Dashboard: 2 Columns"

Steps to reproduce

Install and enable "Dashboards with Layout Builder" module
Create any page with layout builder
Add new section and choose "Two column" (do not choose "Dashboard: 2 Columns"
Save the page
Note that styles from dashboards.css are added to the div with classes layout layout--twocol-section layout--twocol-section--50-50

Proposed resolution

Change selectors in dashboard.css in a way that they would be only used in dahboard layouts

🐛 Bug report
Status

Active

Version

2.1

Component

Code

Created by

🇵🇱Poland besek

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

Comments & Activities

  • Issue created by @besek
  • 🇫🇷France dqd London | N.Y.C | Paris | Hamburg | Berlin

    I do not follow the second step of steps to reproduce. How do you "create any page with layout builder"? Layout builder can not create pages. Are you referring to basic pages (content type in standart profile)? Could you please elaborate on this step what exactly you do to "create a page with layout builder".

  • 🇵🇱Poland besek

    Hi @dqd,

    let me be more precise here: it is about any layout, built with layout builder. Whenever I would create new page in page manager (using layout builder) or content (of any content type) built with layout builder, the issue occurs.
    I hope this helps?

  • 🇫🇷France dqd London | N.Y.C | Paris | Hamburg | Berlin

    Thanks. Yes. You forgot to mention the contrib module "page manager" you are using here at your steps to reproduce ;) that's why it is confusing to read how do you "create a page" with Layout Builder ;)

    Great finding by the way. +1

Production build 0.71.5 2024