From d4e7128f973e7e4147bd0b46459aa0beabd8794e Mon Sep 17 00:00:00 2001 From: ilhan Date: Wed, 6 Mar 2019 09:28:38 +0200 Subject: [PATCH] fix(ui5-label): enable text truncation in IE Additionally, remove all the nesting, preparing transition from LESS to CSS. --- packages/main/src/themes/base/Label.less | 51 ++++++++++++------------ 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/packages/main/src/themes/base/Label.less b/packages/main/src/themes/base/Label.less index 1eab823b91c2..cfa2a7b5927c 100644 --- a/packages/main/src/themes/base/Label.less +++ b/packages/main/src/themes/base/Label.less @@ -12,49 +12,50 @@ :host(ui5-label) { display: inline-block; - cursor: text; max-width: 100%; + cursor: text; +} - & span[data-sap-ui-wc-root] { - display: flex; - } +:host(ui5-label) span[data-sap-ui-wc-root] { + display: flex; } ui5-label { display: inline-block; - cursor: text; max-width: 100%; + overflow: hidden; + cursor: text; +} - & span[data-sap-ui-wc-root] { - display: flex; - } +ui5-label span[data-sap-ui-wc-root] { + display: flex; } .sapMLabel { display: inline-block; - text-overflow: ellipsis; + width: 100%; color: @sapUiContentLabelColor; font-family: @sapUiFontFamily; font-size: @sapMFontMediumSize; font-weight: normal; + text-overflow: ellipsis; overflow: hidden; - width: 100%; white-space: nowrap; cursor: inherit; +} - &.sapMLabelWrapped { - white-space: normal; - line-height: 1.4rem; - } - - &.sapMLabelRequired:before { - content:"*"; - color: @sapUiFieldRequiredColor; - font-size: 1.25rem; - font-weight: bold; - position: relative; - height: 100%; - display: inline-flex; - align-items: flex-start; - } +.sapMLabel.sapMLabelWrapped { + white-space: normal; + line-height: 1.4rem; } + +.sapMLabel.sapMLabelRequired:before { + position: relative; + height: 100%; + display: inline-flex; + align-items: flex-start; + content:"*"; + color: @sapUiFieldRequiredColor; + font-size: 1.25rem; + font-weight: bold; +} \ No newline at end of file