Claro CSS for dropbutton items adds large gap of white space

Created on 13 July 2023, over 1 year ago
Updated 4 June 2024, 7 months ago

Problem/Motivation

When a "Paragraphs (stable)" widget is used, which uses a long list of dropdowns, those items are only "hidden" with CSS, which means they are still present and causing a very long gap of whitespace at the end of the page.

Steps to reproduce

Create a component which uses the "Paragraphs (stable)" widget display type. Create or edit an item. See large white space gap.

Or with only core:

  1. Install demo_umami.
  2. Add an insane amount of operations to every entity. Eg. create a file core/profiles/demo_umami/modules/demo_umami_content/demo_umami_content.module:
    <?php
    
    /**
     * Implements hook_entity_operation().
     */
    function demo_umami_content_entity_operation(\Drupal\Core\Entity\EntityInterface $entity) {
      $operations = [];
      for ($i = 0; $i < 50; $i++) {
        $operations['dummy_' . $i] = [
          'title' => t('Dummy ' . $i),
          'url' => \Drupal\Core\Url::fromRoute('<front>'),
          'weight' => 50,
        ];
      }
    
      return $operations;
    }
    
  3. clear cache
  4. goto /admin/content:

Proposed resolution

Update the Claro theme CSS `dropbutton.css` file for `.dropbutton-wrapper:not(.open) .dropbutton__item:first-of-type ~ .dropbutton__item` items to have a height of 1px, see #12

Remaining tasks

Review

User interface changes

Before

After

API changes

N/A

Data model changes

N/A

Release notes snippet

N/A

๐Ÿ› Bug report
Status

Fixed

Version

10.3 โœจ

Component
Themeย  โ†’

Last updated about 22 hours ago

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States jennypanighetti

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024