From d8cbc0d57d50b8326464455567b08df6c5860491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20S=C3=B6lve?= Date: Fri, 21 Aug 2026 12:14:23 +0200 Subject: [PATCH] fix: keep the submit button from growing while the form is submitting The spinner is appended inside the submit button and carried 2rem of padding, so the button grew while the request was pending and shrank back afterwards. The ring is drawn absolutely positioned by :before with its own dimensions, so the span only needs to be the size of the ring. The ring also defaulted to white, which is invisible on a light button. Since the span sits inside the button, currentColor picks up the button's own text colour instead. --- src/blocks/blocks/form/style.scss | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/blocks/blocks/form/style.scss b/src/blocks/blocks/form/style.scss index f421a3bc9..00366c9ec 100644 --- a/src/blocks/blocks/form/style.scss +++ b/src/blocks/blocks/form/style.scss @@ -452,7 +452,8 @@ .spinner { position: relative; - padding: 2rem; + width: 20px; + height: 20px; &:before { content: ""; box-sizing: border-box; @@ -464,7 +465,7 @@ margin-top: -10px; margin-left: -10px; border-radius: 50%; - border-top: 2px solid var(--submit-color, white); + border-top: 2px solid var(--submit-color, currentColor); border-right: 2px solid transparent; animation: spinner 0.6s linear infinite; }