Provide option to control override of main canvas padding

Created on 1 July 2023, almost 2 years ago
Updated 3 July 2023, almost 2 years ago

When working on a wider screen, content editors may wish to continue viewing the full layout while the off-canvas dialog is open. This is how layout builder works by default.

This module overrides the main canvas style attribute with an !important css rule to remove the padding-right, so the off canvas dialog overlaps the layout. That's great on narrow screens, but cannot be undone - there is no way in css to restore the original padding-right, because we don't know how much padding there should be.

I think this would be ideal as a display option toggle: "Fit width" (or something like that). Unchecked by default to preserve existing behavior.

Alternatively, prefix the css rule with the .glb-body class (or use a dedicated class). Sites wishing to preserve default behavior could remove the body class.

Feature request
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

🇳🇿New Zealand john pitcairn

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

Comments & Activities

Production build 0.71.5 2024