From patchwork Sun Apr 11 15:35:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Luis Felipe X-Patchwork-Id: 28455 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2596227BC73; Sun, 11 Apr 2021 16:36:14 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 2CCA527BC72 for ; Sun, 11 Apr 2021 16:36:13 +0100 (BST) Received: from localhost ([::1]:55316 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lVc8C-0008Fb-D2 for patchwork@mira.cbaines.net; Sun, 11 Apr 2021 11:36:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53856) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVc83-0008FT-24 for guix-patches@gnu.org; Sun, 11 Apr 2021 11:36:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44208) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lVc82-0000J7-Mo for guix-patches@gnu.org; Sun, 11 Apr 2021 11:36:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lVc82-0007x3-KF for guix-patches@gnu.org; Sun, 11 Apr 2021 11:36:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47710] [PATCH] website: Fix dropdown menu shrinking when clicked Resent-From: Luis Felipe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 11 Apr 2021 15:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 47710 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47710@debbugs.gnu.org X-Debbugs-Original-To: Luis Felipe via Guix-patches Received: via spool by submit@debbugs.gnu.org id=B.161815534630538 (code B ref -1); Sun, 11 Apr 2021 15:36:02 +0000 Received: (at submit) by debbugs.gnu.org; 11 Apr 2021 15:35:46 +0000 Received: from localhost ([127.0.0.1]:55754 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lVc7l-0007wU-R6 for submit@debbugs.gnu.org; Sun, 11 Apr 2021 11:35:46 -0400 Received: from lists.gnu.org ([209.51.188.17]:56928) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lVc7k-0007wN-Iq for submit@debbugs.gnu.org; Sun, 11 Apr 2021 11:35:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53846) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVc7k-0008E5-CC for guix-patches@gnu.org; Sun, 11 Apr 2021 11:35:44 -0400 Received: from mail-40130.protonmail.ch ([185.70.40.130]:19635) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVc7g-0008UO-M0 for guix-patches@gnu.org; Sun, 11 Apr 2021 11:35:43 -0400 Date: Sun, 11 Apr 2021 15:35:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1618155336; bh=v214ydWu5GYJZ3UPil33z+cahPVim2WhSZGBuUdIjYs=; h=Date:To:From:Reply-To:Subject:From; b=bRQHW+W6++3Sg8uZuwOzJfh1A2PLDk4WE5HZeEN5Ps6JCMZs+0v9ANuUr9SgL6ib5 2l4CRniXBbxEdVhjU7puerwX3UMemuU3ALl4FAUcpN2ws8Zc6kX4SxP2T8n27DVL/v AbFU4t6vEyN3oWbNVXcGQ15X4zNV8WAAGcqvkbJE= Message-ID: <6qPduW122TIVLNu9Rj_6WQGFxdoNCifPrJccAjS5vVqz-1ROc0Oz9Mj1jQNuueNtgXJh1VyK9NX1bUnZV0__a7E1n1_La1beKfPVxcn1Zes=@protonmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=185.70.40.130; envelope-from=luis.felipe.la@protonmail.com; helo=mail-40130.protonmail.ch X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Luis Felipe X-ACL-Warn: , Luis Felipe via Guix-patches X-Patchwork-Original-From: Luis Felipe via Guix-patches via From: Luis Felipe X-getmail-retrieved-from-mailbox: Patches Hi, This patch fixes dropdown menus shrinking when toggling dropdown buttons. --- Luis Felipe López Acevedo https://luis-felipe.gitlab.io/ From 9ef47c6870a742d1c3b824a65e262dc30d4db6de Mon Sep 17 00:00:00 2001 From: Luis Felipe 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