unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Luis Felipe via Guix-patches via <guix-patches@gnu.org>
To: 47710@debbugs.gnu.org
Subject: [bug#47710] [PATCH] website: Fix dropdown menu shrinking when clicked
Date: Sun, 11 Apr 2021 15:35:32 +0000	[thread overview]
Message-ID: <6qPduW122TIVLNu9Rj_6WQGFxdoNCifPrJccAjS5vVqz-1ROc0Oz9Mj1jQNuueNtgXJh1VyK9NX1bUnZV0__a7E1n1_La1beKfPVxcn1Zes=@protonmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 147 bytes --]

Hi,

This patch fixes dropdown menus shrinking when toggling dropdown buttons.

---
Luis Felipe López Acevedo
https://luis-felipe.gitlab.io/

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-website-Fix-dropdown-menu-shrinking-when-clicked.patch --]
[-- Type: text/x-patch; name=0001-website-Fix-dropdown-menu-shrinking-when-clicked.patch, Size: 1252 bytes --]

From 9ef47c6870a742d1c3b824a65e262dc30d4db6de Mon Sep 17 00:00:00 2001
From: Luis Felipe <luis.felipe.la@protonmail.com>
Date: Sun, 11 Apr 2021 10:02:25 -0500
Subject: [PATCH] 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.
---
 website/apps/base/templates/components.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/website/apps/base/templates/components.scm b/website/apps/base/templates/components.scm
index 5440408..f521436 100644
--- a/website/apps/base/templates/components.scm
+++ b/website/apps/base/templates/components.scm
@@ -310,7 +310,7 @@ manual.
 {
     min-width: 150px;
     /* reset to initial values: */
-    width: auto;
+    width: max-content;
     height: auto;
     overflow: visible;
 }"))

base-commit: af5f9244a8c8032bec77d5f4334f49940b814220
-- 
2.31.0


             reply	other threads:[~2021-04-11 15:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-11 15:35 Luis Felipe via Guix-patches via [this message]
2021-04-11 16:30 ` bug#47710: [PATCH] website: Fix dropdown menu shrinking when clicked Mathieu Othacehe
2021-04-11 21:48 ` [bug#47710] " pelzflorian (Florian Pelz)
2021-04-12  2:05   ` Luis Felipe via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='6qPduW122TIVLNu9Rj_6WQGFxdoNCifPrJccAjS5vVqz-1ROc0Oz9Mj1jQNuueNtgXJh1VyK9NX1bUnZV0__a7E1n1_La1beKfPVxcn1Zes=@protonmail.com' \
    --to=guix-patches@gnu.org \
    --cc=47710@debbugs.gnu.org \
    --cc=luis.felipe.la@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).