From 5f44c51d89096ab35000cb7bfc7b2d191a86182e Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 9 Dec 2022 10:55:19 -0700 Subject: [PATCH] Et2Checkbox: Fix internal positioning was causing entire page to overflow --- api/js/etemplate/Et2Checkbox/Et2Checkbox.ts | 33 +++++++++++++-------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/api/js/etemplate/Et2Checkbox/Et2Checkbox.ts b/api/js/etemplate/Et2Checkbox/Et2Checkbox.ts index c6115a6044..3ad3dd41cf 100644 --- a/api/js/etemplate/Et2Checkbox/Et2Checkbox.ts +++ b/api/js/etemplate/Et2Checkbox/Et2Checkbox.ts @@ -28,19 +28,26 @@ export class Et2Checkbox extends Et2InputWidget(SlCheckbox) ...shoelace, ...super.styles, css` - :host { - /* Make it line up with the middle of surroundings */ - margin: auto 0px; - vertical-align: baseline; - } - :host([disabled]) { - display:initial; - } - /* Extend hover highlight to label */ - .checkbox:not(.checkbox--disabled):hover { - color: var(--sl-input-border-color-hover); - } - `, + :host { + /* Make it line up with the middle of surroundings */ + margin: auto 0px; + vertical-align: baseline; + } + + :host([disabled]) { + display: initial; + } + + /* Fix positioning */ + .checkbox { + position: relative; + } + + /* Extend hover highlight to label */ + .checkbox:not(.checkbox--disabled):hover { + color: var(--sl-input-border-color-hover); + } + `, ]; }