Skip to content

Commit b9157dc

Browse files
committed
prevent floating label text from wrapping
1 parent 4ab203e commit b9157dc

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

assets/sass/components/_form-floating-label.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
.floating-label {
22
color: $black-hint;
33
cursor: text;
4+
display: block;
45
font-size: $font-size;
56
line-height: 1;
67
margin: 0;
8+
overflow: hidden;
79
padding: 0;
810
position: absolute;
911
top: (($input-height - $font-size) / 2);
1012
left: 0;
13+
text-overflow: ellipsis;
1114
transform-origin: 0 0;
1215
transition-duration: 0.3s;
1316
transition-property: color, transform;
1417
transition-timing-function: $timing;
18+
white-space: nowrap;
1519
.form-group-label [class*="col-"] & {
1620
// position
1721
left: $grid-gutter;

css/base.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3585,13 +3585,16 @@ fieldset[disabled] input[type="checkbox"]:checked ~ .checkbox-circle-icon, input
35853585
.floating-label {
35863586
color: rgba(0, 0, 0, 0.38);
35873587
cursor: text;
3588+
display: block;
35883589
font-size: 14px;
35893590
line-height: 1;
35903591
margin: 0;
3592+
overflow: hidden;
35913593
padding: 0;
35923594
position: absolute;
35933595
top: 11px;
35943596
left: 0;
3597+
text-overflow: ellipsis;
35953598
-webkit-transform-origin: 0 0;
35963599
transform-origin: 0 0;
35973600
-webkit-transition-duration: 0.3s;
@@ -3602,6 +3605,7 @@ fieldset[disabled] input[type="checkbox"]:checked ~ .checkbox-circle-icon, input
36023605
transition-property: color, transform, -webkit-transform;
36033606
-webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
36043607
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
3608+
white-space: nowrap;
36053609
}
36063610
.form-group-label [class*="col-"] .floating-label {
36073611
left: 16px;

css/base.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)