public inbox for yew-devel@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] calendar grid: add `pwt-calendar-hide-weekends` class
Date: Wed, 12 Aug 2026 12:32:48 +0200	[thread overview]
Message-ID: <20260812103354.1734504-1-d.csapak@proxmox.com> (raw)

necessary for the hide_weekends flag of the calendar grid, since we need
to overwrite the number of grid columns.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
this is also necessary for
https://lore.proxmox.com/yew-devel/20260812103115.1710697-1-d.csapak@proxmox.com/T/#u
forgot to send it as a series, will do so if a v2 is necessary.

 scss/_calendar_grid.scss | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/scss/_calendar_grid.scss b/scss/_calendar_grid.scss
index 79dfdcc..5522d5f 100644
--- a/scss/_calendar_grid.scss
+++ b/scss/_calendar_grid.scss
@@ -11,6 +11,8 @@
 ///   height; its grid then slices evenly instead of sizing on content.
 /// - `pwt-calendar-grid` / `-grid-header` - the seven-column day grid and its
 ///   weekday-label row; `pwt-calendar-weekday` is one header label.
+/// - `pwt-calendar-hide-weekends` - the root when the widget drops Saturday and
+///   Sunday (`hide_weekends`); both grids then narrow to five columns.
 /// - `pwt-calendar-day` - one day cell; `-outside` (not the anchored month),
 ///   `-today` and `-weekend` tint or mark it. `pwt-calendar-daynum` is the
 ///   day number.
@@ -68,6 +70,13 @@
     width: 100%;
 }
 
+// The working week: the widget emits no cell at all for Saturday and Sunday, so
+// both grids drop to five columns and the remaining days share the full width.
+.pwt-calendar-hide-weekends .pwt-calendar-grid,
+.pwt-calendar-hide-weekends .pwt-calendar-grid-header {
+    grid-template-columns: repeat(5, minmax(0, 1fr));
+}
+
 .pwt-calendar-grid-header {
     gap: 0;
 }
-- 
2.47.3





                 reply	other threads:[~2026-08-12 10:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20260812103354.1734504-1-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal