all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: yew-devel@lists.proxmox.com
Subject: [PATCH yew-widget-toolkit-assets 1/4] navigation rail: style the expand button
Date: Mon, 10 Aug 2026 16:34:51 +0200	[thread overview]
Message-ID: <20260810143536.31163-2-d.csapak@proxmox.com> (raw)
In-Reply-To: <20260810143536.31163-1-d.csapak@proxmox.com>

Style the optional expand button the widget toolkit's NavigationRail
renders at the top of the rail. The action icon defaults to the accent
color, which would compete with the selected item, so draw it in the
rail's own foreground color instead. Following Material, the expanded
variant aligns it at the inline start, lined up with the item icons.
Also remove the background circle color that stems from the ActionIcon.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 scss/_navigation_rail.scss | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/scss/_navigation_rail.scss b/scss/_navigation_rail.scss
index 588fab7..9bb664a 100644
--- a/scss/_navigation_rail.scss
+++ b/scss/_navigation_rail.scss
@@ -17,6 +17,16 @@
 
     @include elevation-background-color($level: 0);
 
+    .pwt-navigation-rail-expand-button {
+        .pwt-action-icon {
+            // the accent color is reserved for the selected item
+            color: var(--pwt-color-on-surface);
+
+            // hide the background for the action icon
+            @include state-layer($base: transparent, $color: transparent);
+        }
+    }
+
     .pwt-navigation-rail-tabs {
         display: flex;
         flex-direction: column;
@@ -99,6 +109,13 @@
         min-width: 220px;
         max-width: 360px;
 
+        // the expanded rail lines its content up at the inline start, the margin matches the item
+        // padding so the button keeps sitting above the item icons
+        .pwt-navigation-rail-expand-button {
+            align-self: flex-start;
+            margin-inline-start: var(--pwt-spacer-2);
+        }
+
         .pwt-navigation-rail-tabs {
             align-self: stretch;
 
-- 
2.47.3





  reply	other threads:[~2026-08-10 14:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-10 14:34 [PATCH yew-widget-toolkit/yew-widget-toolkit-assets 0/4] adaptive scaffold/navigation rail improvements Dominik Csapak
2026-08-10 14:34 ` Dominik Csapak [this message]
2026-08-10 14:34 ` [PATCH yew-widget-toolkit 2/4] touch: navigation rail: move auto layout from AdaptiveScaffold Dominik Csapak
2026-08-10 14:34 ` [PATCH yew-widget-toolkit 3/4] touch: navigation rail: add an optional expand button Dominik Csapak
2026-08-10 14:34 ` [PATCH yew-widget-toolkit 4/4] touch: adaptive scaffold: pass the rail group alignment through Dominik Csapak

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

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

  git send-email \
    --in-reply-to=20260810143536.31163-2-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=yew-devel@lists.proxmox.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.
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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal