Skip to content

Commit 3cdcede

Browse files
authored
fix(ui5-checkbox): fix truncation in compactSize (#998)
Although there is enough space, the checkbox used to truncate, now this is fixed. FIXES: #996
1 parent 3eca602 commit 3cdcede

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

packages/main/src/themes/CheckBox.css

+7-1
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,13 @@ https://github.com/philipwalton/flexbugs/issues/231
148148
}
149149

150150
/* Compact */
151+
:host([text][data-ui5-compact-size]) .ui5-checkbox-root {
152+
padding-right: 0;
153+
}
154+
:host([text][data-ui5-compact-size]) .ui5-checkbox-root:focus::before {
155+
right: 0;
156+
}
157+
151158
:host([wrap][text][data-ui5-compact-size]) .ui5-checkbox-root {
152159
min-height: auto;
153160
padding-top: var(--_ui5_checkbox_wrapped_focus_padding);
@@ -186,7 +193,6 @@ https://github.com/philipwalton/flexbugs/issues/231
186193

187194
:host([data-ui5-compact-size]) .ui5-checkbox-root .ui5-checkbox-label {
188195
margin-left: var(--_ui5_checkbox_compact_wrapper_padding);
189-
width: calc(100% - .8125rem - var(--_ui5_checkbox_compact_inner_size));
190196
}
191197

192198
:host([data-ui5-compact-size]) .ui5-checkbox-icon {

packages/main/test/pages/CheckBox.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
</head>
2121

2222
<body>
23-
<ui5-checkbox id="cb1"></ui5-checkbox>
23+
<ui5-checkbox id="cb1" text="Long long long text"></ui5-checkbox>
2424
<ui5-checkbox id="cbError" value-state="Error"></ui5-checkbox>
2525
<ui5-checkbox id="cb2" disabled></ui5-checkbox>
2626
<ui5-checkbox id="truncatingCb" text="Long long long text that should truncate at some point" style="width: 300px"></ui5-checkbox>

0 commit comments

Comments
 (0)