Skip to content

Commit f2ffbeb

Browse files
authored
fix(b-form-datepicker/b-form-timepicker): control size (#6249)
1 parent 6789dd7 commit f2ffbeb

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

src/components/form-btn-label-control/_form-btn-label-control.scss

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@ $bv-form-btn-label-control-defined: false !default;
88
// Currently used by BFormTimepicker and BFormDatepicker
99
// Does not apply to button-only styling
1010
.b-form-btn-label-control.form-control {
11+
display: flex;
12+
align-items: stretch;
13+
height: auto;
14+
padding: 0;
1115
// Remove background validation images and padding from
1216
// main wrapper as they will be present in the inner label element
1317
background-image: none;
14-
padding: 0;
1518

1619
@at-root {
17-
// Handle input-group padding overrides
20+
// Handle `.input-group` padding overrides
1821
.input-group & {
1922
padding: 0;
2023
}
@@ -55,19 +58,23 @@ $bv-form-btn-label-control-defined: false !default;
5558
padding: 0.5rem;
5659
}
5760

58-
> label {
59-
outline: 0;
61+
> .form-control {
62+
height: auto;
63+
// Set a minimum height, as we have height set to `auto`
64+
// (to allow the content to wrap, if needed)
65+
// We subtract off the border, as we have border set to `0`
66+
min-height: calc(#{$input-height} - #{$input-height-border});
6067
padding-left: 0.25rem;
6168
margin: 0;
6269
border: 0;
70+
outline: 0;
71+
background: transparent;
72+
word-break: break-word;
6373
font-size: inherit;
74+
white-space: normal;
6475
@if $enable-pointer-cursor-for-buttons {
6576
cursor: pointer;
6677
}
67-
// Set a minimum height, as we have height set to auto
68-
// (to allow the content to wrap if needed)
69-
// We subtract off the border, as we have border set to 0
70-
min-height: calc(#{$input-height} - #{$input-height-border});
7178

7279
&.form-control-sm {
7380
min-height: calc(#{$input-height-sm} - #{$input-height-border});

src/components/form-btn-label-control/bv-form-btn-label-control.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,6 @@ export const BVFormBtnLabelControl = /*#__PURE__*/ Vue.extend({
212212
? 'sr-only' // Hidden in button only mode
213213
: [
214214
'form-control',
215-
'text-break',
216-
'text-wrap',
217-
'bg-transparent',
218215
// Mute the text if showing the placeholder
219216
{ 'text-muted': !value },
220217
this.stateClass,
@@ -255,9 +252,6 @@ export const BVFormBtnLabelControl = /*#__PURE__*/ Vue.extend({
255252
{
256253
'btn-group': buttonOnly,
257254
'form-control': !buttonOnly,
258-
'd-flex': !buttonOnly,
259-
'h-auto': !buttonOnly,
260-
'align-items-stretch': !buttonOnly,
261255
focus: hasFocus && !buttonOnly,
262256
show: visible,
263257
'is-valid': state === true,

0 commit comments

Comments
 (0)