website: Fix dropdown menu shrinking when clicked.

When clicking or tapping on a dropdown button in the primary menu of
the website the menu width is shrunk to its min-width, and long items
are broken into separate lines making them look as if they were
different items in the menu.

This change fixes these problems by leaving the menu width as wide as
its longest item when the button is toggled.

* apps/base/templates/components.scm (menu-dropdown): Set width to
  max-content on :checked.
This commit is contained in:
Luis Felipe 2021-04-11 10:02:25 -05:00 committed by Mathieu Othacehe
parent 80235c9a94
commit d3f524d4ea
No known key found for this signature in database
GPG Key ID: 8354763531769CA6
1 changed files with 1 additions and 1 deletions

View File

@ -310,7 +310,7 @@ manual.
{
min-width: 150px;
/* reset to initial values: */
width: auto;
width: max-content;
height: auto;
overflow: visible;
}"))