Skip to content

Commit 9910739

Browse files
fix(ui5-step-input): make popover specs fit content (#12520)
Encapsulate styles, so the one inhertited in the ui5-input do not change the value state message popover. fixes: #10246 Before: image After: image
1 parent 5b16798 commit 9910739

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

packages/main/src/themes/StepInput.css

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,25 +163,32 @@
163163
}
164164

165165
:host .ui5-step-input-root {
166-
white-space: nowrap;
167166
line-height: inherit;
168167
letter-spacing: inherit;
169168
word-spacing: inherit;
170169
height: inherit;
171170
}
172171

173-
:host .ui5-step-input-input[text-align=left] {
172+
:host .ui5-step-input-input::part(input) {
173+
white-space: nowrap;
174+
}
175+
176+
:host .ui5-step-input-input[text-align=left]::part(input) {
174177
text-align: left;
175178
}
176179

177-
:host .ui5-step-input-input[text-align=center] {
180+
:host .ui5-step-input-input[text-align=center]::part(input) {
178181
text-align: center;
179182
}
180183

181-
:host .ui5-step-input-input[text-align=right] {
184+
:host .ui5-step-input-input[text-align=right]::part(input) {
182185
text-align: right;
183186
}
184187

188+
::slotted([slot="valueStateMessage"]) {
189+
text-align: left;
190+
}
191+
185192
:host .ui5-step-icon {
186193
position: absolute;
187194
display: var(--_ui5_step_input_button_display);

packages/main/test/pages/StepInput.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ <h3>StepInput with valueStateChange Prevented</h3>
9696
placeholder="Enter number"
9797
value-state="Negative"
9898
class="stepinput2auto"
99-
></ui5-step-input>
99+
>
100+
<div slot="valueStateMessage" class="stepinput3auto">Tsanislav Gatev wrote this message so it can be long enough so we can test if wraps</div></ui5-step-input>
100101
</div>
101102

102103
<div>

0 commit comments

Comments
 (0)