all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH yew-widget-toolkit-assets] input: align check boxes better in forms
@ 2026-03-09  8:41 Shannon Sterz
  2026-03-09  9:31 ` applied: " Dominik Csapak
  0 siblings, 1 reply; 2+ messages in thread
From: Shannon Sterz @ 2026-03-09  8:41 UTC (permalink / raw)
  To: yew-devel

by applying a negative margin to the left and right sides. this is
necessary, as we apply a background-color when the checkbox is, for
exampled, hovered. if we just applied the padding to the bottom and
top, that background would appear as an oval due to the way
`border-radius: 50%` works on non-square elements.

the negative margin preserves the square shape of the element while
essentially removing the extra space added by the padding property.

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
---
 scss/_input.scss | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scss/_input.scss b/scss/_input.scss
index 293717c..3644043 100644
--- a/scss/_input.scss
+++ b/scss/_input.scss
@@ -187,7 +187,9 @@ input {
     @include accent-color-scheme-vars($default-accent-color);

     display: inline-block;
-    padding: max(map-get($line-height, "label-large") - map-get($font-size, "label-large"), var(--pwt-spacer-1));
+    $pwt-checkbox-state-padding: max(map-get($line-height, "label-large") - map-get($font-size, "label-large"), var(--pwt-spacer-1));
+    padding: $pwt-checkbox-state-padding;
+    margin: auto calc(-1 * $pwt-checkbox-state-padding);
     border-radius: 50%;
     transition: background 0.3s;

--
2.47.3





^ permalink raw reply	[flat|nested] 2+ messages in thread

* applied: [PATCH yew-widget-toolkit-assets] input: align check boxes better in forms
  2026-03-09  8:41 [PATCH yew-widget-toolkit-assets] input: align check boxes better in forms Shannon Sterz
@ 2026-03-09  9:31 ` Dominik Csapak
  0 siblings, 0 replies; 2+ messages in thread
From: Dominik Csapak @ 2026-03-09  9:31 UTC (permalink / raw)
  To: yew-devel, Shannon Sterz

On Mon, 09 Mar 2026 09:41:21 +0100, Shannon Sterz wrote:
> by applying a negative margin to the left and right sides. this is
> necessary, as we apply a background-color when the checkbox is, for
> exampled, hovered. if we just applied the padding to the bottom and
> top, that background would appear as an oval due to the way
> `border-radius: 50%` works on non-square elements.
> 
> the negative margin preserves the square shape of the element while
> essentially removing the extra space added by the padding property.
> 
> [...]

Applied, thanks!

[1/1] input: align check boxes better in forms
      commit: eeb320d320fee7e973d964bb8133c9aeb09f9fa9




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-03-09  9:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-09  8:41 [PATCH yew-widget-toolkit-assets] input: align check boxes better in forms Shannon Sterz
2026-03-09  9:31 ` applied: " Dominik Csapak

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