Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The plus icon for .layout-builder__link--add is set to be top left, which means when the line height / font size of a theme is bigger than the icon it becomes offset - see below for how this looks in Umami.
core/modules/layout_builder/css/layout-builder.css and core/themes/stable/css/layout_builder/layout-builder.css should use center left instead of top left.
Before:
After:
Comment | File | Size | Author |
---|---|---|---|
#3 | interdiff_2-3.txt | 1.52 KB | shaal |
#3 | layout-builder-plus-icon-vertically-centered-3050225-3.patch | 1.59 KB | shaal |
#2 | 3050225-2--layout-builder-add-link.patch | 1.26 KB | smaz |
add-links-after.png | 9.01 KB | smaz | |
add-links-before.png | 7.7 KB | smaz |
Comments
Comment #2
smazPatch attached.
Comment #3
shaalChanged the units of the Plus icon size (and padding) to
em
, so it can always match the font-size of the text next to it.Comment #4
kjay CreditAttribution: kjay commentedThis patch works as described. The plus icon aligns vertically centered and resizes on text resize. Setting to RTBC.
Comment #5
thalles+1 RTBC
Works for me!
Visually more enjoyable!
Comment #7
shaalTest failed randomly, switching it back to RTBC.
Comment #8
lauriiiLooks like a nice improvement! I think we should make this bug fix to Stable as well. Because of that, I'm only committing this for 8.8.x.
Committed f8f83d5 and pushed to 8.8.x. Thanks!