Fix signature pad clear button accessibility and canvas height drift (#2789)

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Bartosz-Do
2026-08-05 00:39:44 +02:00
committed by GitHub
co-authored by Claude Opus 5
parent 6a63e4069c
commit dbe391dc23
2 changed files with 7 additions and 4 deletions
+5
View File
@@ -3,6 +3,7 @@
.signature {
--#{$prefix}signature-padding: var(--#{$prefix}spacer-1);
--#{$prefix}signature-border-radius: var(--#{$prefix}border-radius);
--#{$prefix}signature-canvas-height: 12.5rem;
border: var(--#{$prefix}border-width) solid var(--#{$prefix}border-color);
padding: var(--#{$prefix}signature-padding);
@include border-radius(var(--#{$prefix}border-radius));
@@ -14,4 +15,8 @@
display: block;
cursor: crosshair;
width: 100%;
// A fixed height is required: without it the canvas height comes from its own
// width/height attributes, which `resizeCanvas()` rewrites on every resize —
// each run then measures a different `offsetHeight` and the pad drifts.
height: var(--#{$prefix}signature-canvas-height);
}