From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id F0D3E1FF0B4 for ; Fri, 27 Nov 2026 17:12:52 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 1D36421758; Fri, 27 Nov 2026 17:12:46 +0100 (CET) From: Dominik Csapak To: pdm-devel@lists.proxmox.com Subject: [PATCH yew-widget-toolkit-assets 07/38] charts: world map: add class for the shade of the night Date: Fri, 27 Nov 2026 17:12:04 +0100 Message-ID: <20261127161241.3713494-8-d.csapak@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261127161241.3713494-1-d.csapak@proxmox.com> References: <20261127161241.3713494-1-d.csapak@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.257 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: Q3AVXHLN6ZAW6CNWXXCP47WSV6GQ735T X-Message-ID-Hash: Q3AVXHLN6ZAW6CNWXXCP47WSV6GQ735T X-MailFrom: d.csapak@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: A WorldMap can now shade the part of the world where it is night, with a black image that gets more opaque the further the sun is below the horizon. Make it rather translucent, so the map below stays readable. The opacity is a custom property, so it can be overridden. Signed-off-by: Dominik Csapak --- scss/_charts.scss | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scss/_charts.scss b/scss/_charts.scss index b099c83..6c429e2 100644 --- a/scss/_charts.scss +++ b/scss/_charts.scss @@ -81,13 +81,15 @@ /// /// Used for a `WorldMap`. The colors can be overridden via the `--pwt-world-map-water-color`, /// `--pwt-world-map-land-color`, `--pwt-world-map-coast-color`, `--pwt-world-map-border-color` -/// and `--pwt-world-map-graticule-color` custom properties. +/// and `--pwt-world-map-graticule-color` custom properties, and how dark the night gets via +/// `--pwt-world-map-night-opacity`. .pwt-world-map { --pwt-world-map-water-color: color-mix(in srgb, var(--pwt-color-primary) 6%, var(--pwt-color-surface)); --pwt-world-map-land-color: var(--pwt-color-neutral); --pwt-world-map-coast-color: color-mix(in srgb, var(--pwt-color-on-surface) 30%, transparent); --pwt-world-map-border-color: color-mix(in srgb, var(--pwt-color-on-surface) 22%, transparent); --pwt-world-map-graticule-color: color-mix(in srgb, var(--pwt-color-on-surface) 8%, transparent); + --pwt-world-map-night-opacity: 0.3; // a stronger tint in the middle gives the water some depth background: radial-gradient( @@ -107,6 +109,14 @@ vector-effect: non-scaling-stroke; } +/// Class `pwt-world-map-night` +/// +/// Used for the image that shades the part of a `WorldMap` where it is night. The image is +/// black and gets more opaque the further the sun is below the horizon. +.pwt-world-map-night { + opacity: var(--pwt-world-map-night-opacity); +} + /// Class `pwt-world-map-feature` /// /// Used for the shapes of a GeoJSON feature on a `WorldMap`. The `data-kind` attribute holds -- 2.47.3