The top bar is constantly visible even when it's empty
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3593445. --> Reported by: [spryah](https://www.drupal.org/user/3777159) Related to !794 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>According to the CSS, the top bar is set to be hidden by default and to become visible when at least one of its children is not empty. However, it remains constantly visible because, even if the children are empty, the whitespace prevents the styles from applying correctly. </p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <ol> <li>Log in to the Drupal administration site with the Gin theme enabled.</li> <li>Navigate to a non-existent URL (e.g., /some-random-404-path) to trigger a 404 Error page.</li> <li>Observe the top of the page (below the main toolbar).</li> <li>Notice that the top bar wrapper (.gin-top-bar) is still visible and takes up vertical space, even though it contains no actual content (no title, breadcrumbs, or local tasks). This happens because Twig outputs whitespace, preventing the CSS :empty pseudo-class from hiding it.</li> </ol> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Add whitespace trimming via the <code>-</code> modifier, as described in the Twig whitespace control documentation.<br> The modifications should be applied in the top bar template at these locations:</p> <ol> <li>Add the whitespace control modifiers (<code>{%-</code> and <code>-%}</code>) around the control block for <code>gin_breadcrumbs</code>.</li> <li>Add the whitespace control modifiers around the control block for <code>gin_local_actions</code>.</li> </ol> <p>We could do more, but it seems that these changes are enough to solve our problem</p>
issue