From 3eabb6e36df11559ca365ee1b11513b5edfaa815 Mon Sep 17 00:00:00 2001 From: ilhan Date: Thu, 28 Nov 2019 15:25:49 +0200 Subject: [PATCH] fix(ui5-checkbox): fix truncation in compactSize Although there is enough space, the checkbox used to truncate, now this is fixed. FIXES: https://github.com/SAP/ui5-webcomponents/issues/996 --- packages/main/src/themes/CheckBox.css | 8 +++++++- packages/main/test/pages/CheckBox.html | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/main/src/themes/CheckBox.css b/packages/main/src/themes/CheckBox.css index b3d7bd67e719..2efaf5d0d12d 100644 --- a/packages/main/src/themes/CheckBox.css +++ b/packages/main/src/themes/CheckBox.css @@ -148,6 +148,13 @@ https://github.com/philipwalton/flexbugs/issues/231 } /* Compact */ +:host([text][data-ui5-compact-size]) .ui5-checkbox-root { + padding-right: 0; +} +:host([text][data-ui5-compact-size]) .ui5-checkbox-root:focus::before { + right: 0; +} + :host([wrap][text][data-ui5-compact-size]) .ui5-checkbox-root { min-height: auto; padding-top: var(--_ui5_checkbox_wrapped_focus_padding); @@ -186,7 +193,6 @@ https://github.com/philipwalton/flexbugs/issues/231 :host([data-ui5-compact-size]) .ui5-checkbox-root .ui5-checkbox-label { margin-left: var(--_ui5_checkbox_compact_wrapper_padding); - width: calc(100% - .8125rem - var(--_ui5_checkbox_compact_inner_size)); } :host([data-ui5-compact-size]) .ui5-checkbox-icon { diff --git a/packages/main/test/pages/CheckBox.html b/packages/main/test/pages/CheckBox.html index 3d1f168d834b..82c27d280242 100644 --- a/packages/main/test/pages/CheckBox.html +++ b/packages/main/test/pages/CheckBox.html @@ -20,7 +20,7 @@ - +