* [bug#47710] [PATCH] website: Fix dropdown menu shrinking when clicked
@ 2021-04-11 15:35 Luis Felipe via Guix-patches via
2021-04-11 16:30 ` bug#47710: " Mathieu Othacehe
2021-04-11 21:48 ` [bug#47710] " pelzflorian (Florian Pelz)
0 siblings, 2 replies; 4+ messages in thread
From: Luis Felipe via Guix-patches via @ 2021-04-11 15:35 UTC (permalink / raw)
To: 47710
[-- 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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* bug#47710: [PATCH] website: Fix dropdown menu shrinking when clicked
2021-04-11 15:35 [bug#47710] [PATCH] website: Fix dropdown menu shrinking when clicked Luis Felipe via Guix-patches via
@ 2021-04-11 16:30 ` Mathieu Othacehe
2021-04-11 21:48 ` [bug#47710] " pelzflorian (Florian Pelz)
1 sibling, 0 replies; 4+ messages in thread
From: Mathieu Othacehe @ 2021-04-11 16:30 UTC (permalink / raw)
To: Luis Felipe; +Cc: 47710-done
Hey,
> This patch fixes dropdown menus shrinking when toggling dropdown buttons.
Works great, thanks for fixing it. Pushed as
d3f524d4ea9502e216208b7c3d5f22b9045d4a5c.
Mathieu
^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#47710] [PATCH] website: Fix dropdown menu shrinking when clicked
2021-04-11 15:35 [bug#47710] [PATCH] website: Fix dropdown menu shrinking when clicked Luis Felipe via Guix-patches via
2021-04-11 16:30 ` bug#47710: " Mathieu Othacehe
@ 2021-04-11 21:48 ` pelzflorian (Florian Pelz)
2021-04-12 2:05 ` Luis Felipe via Guix-patches via
1 sibling, 1 reply; 4+ messages in thread
From: pelzflorian (Florian Pelz) @ 2021-04-11 21:48 UTC (permalink / raw)
To: Luis Felipe; +Cc: 47710
On Sun, Apr 11, 2021 at 03:35:32PM +0000, Luis Felipe via Guix-patches via wrote:
> Subject: [PATCH] website: Fix dropdown menu shrinking when clicked.
> […]
> This change fixes these problems by leaving the menu width as wide as
> its longest item when the button is toggled.
Thank you, this does the trick. (Except on Microsoft Internet
Explorer, which we do not need to care about anymore.)
> * apps/base/templates/components.scm (menu-dropdown): Set width to
> max-content on :checked.
The last line should not be indented, but it does not matter.
> ---
> 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;
> }"))
The comment /* reset to initial values: */ is misplaced now;
max-content is not an initial value for width. I have moved the
comment down one line in commit
81a6c477d92b2c4a206c390b97c9cb0159d79719.
Regards,
Florian
^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#47710] [PATCH] website: Fix dropdown menu shrinking when clicked
2021-04-11 21:48 ` [bug#47710] " pelzflorian (Florian Pelz)
@ 2021-04-12 2:05 ` Luis Felipe via Guix-patches via
0 siblings, 0 replies; 4+ messages in thread
From: Luis Felipe via Guix-patches via @ 2021-04-12 2:05 UTC (permalink / raw)
To: pelzflorian (Florian Pelz); +Cc: 47710@debbugs.gnu.org
Thank you for cleaning that up, Florian.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-04-12 2:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-11 15:35 [bug#47710] [PATCH] website: Fix dropdown menu shrinking when clicked Luis Felipe via Guix-patches via
2021-04-11 16:30 ` bug#47710: " Mathieu Othacehe
2021-04-11 21:48 ` [bug#47710] " pelzflorian (Florian Pelz)
2021-04-12 2:05 ` Luis Felipe via Guix-patches via
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.