From cf9c9ad87bfae55a94728e9b9f4d8a0ea483dd62 Mon Sep 17 00:00:00 2001 From: greta Date: Wed, 14 Aug 2024 11:38:24 +0200 Subject: [PATCH] fix:fix checkbox and radio alignment Signed-off-by: greta --- src/components/NcActionCheckbox/NcActionCheckbox.vue | 3 +-- src/components/NcActionRadio/NcActionRadio.vue | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/NcActionCheckbox/NcActionCheckbox.vue b/src/components/NcActionCheckbox/NcActionCheckbox.vue index 1541a0df4c..54d30dba5a 100644 --- a/src/components/NcActionCheckbox/NcActionCheckbox.vue +++ b/src/components/NcActionCheckbox/NcActionCheckbox.vue @@ -206,8 +206,7 @@ export default { &::before { margin-block: 0 !important; - // 16px is the width of the checkbox including the border - margin-inline: calc((var(--default-clickable-area) - 16px) / 2) !important; + margin-inline: calc((var(--default-clickable-area) - 14px) / 2) !important; } } diff --git a/src/components/NcActionRadio/NcActionRadio.vue b/src/components/NcActionRadio/NcActionRadio.vue index 7b655260c0..ae3a46593b 100644 --- a/src/components/NcActionRadio/NcActionRadio.vue +++ b/src/components/NcActionRadio/NcActionRadio.vue @@ -199,10 +199,9 @@ export default { padding: 0 !important; padding-right: $icon-margin !important; - // radio-width is 12px, border is 2 - // (44 - 14 - 2) / 2 = 14 + // (34 -14) / 2 = 10 same as ncactioncheckbox &::before { - margin: 0 14px 0 !important; + margin: calc((var(--default-clickable-area) - 14px) / 2) !important; } }