Add Helper Tool to visualize paragraph spacings (directly in the layout preview)

Created on 29 June 2021, over 3 years ago
Updated 7 March 2024, 10 months ago

Problem/Motivation

It could be very hard for (end)users to figure out where an inner/outer spacing comes from. In addition to the spacings caused by our spacings setting widget, there also default spacings set in css (if no custom value is set by the spacings widget).

Proposed resolution

[ ] Add a visual tool to show the spacings right in the layout paragraphs preview.
[ ] Also add a hint if min-height is set on a paragraph - what also causes spacings
[ ] Add a hint - if the user nests a paragraph with .box-style of the same color (what will visually result in more spacings)

Ideas:
- Idea 1: A floating Cross-indicator block, showing margin and padding with the same colors we already use in the spacings form widget. This indicator is just visible on hover OR there is a switch to toggle it:
- Idea 2: Find a way to colorize the padding/margin itself. This could work, but will sure conflict with other preview styles like .box-style.

To do so we may need Javascript to get the current paragraphs spacings. The important part for the user is to find out which paragraph causes which spacing (margin/padding), not really where the spacing came from (because the spacings widget will override default CSS declarations, the user will always be able to override them this way).

Feature request
Status

Active

Version

1.0

Component

User interface

Created by

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024