Skip to content

Commit

Permalink
Merge pull request #1041 from melloware/PR1040
Browse files Browse the repository at this point in the history
Fix #1040: InputTextArea floating label CSS.
  • Loading branch information
mertsincan authored Oct 14, 2019
2 parents bfa0d51 + 656c857 commit 60c0fa4
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 19 deletions.
20 changes: 20 additions & 0 deletions src/components/common/Common.css
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,24 @@ button {

.p-toggleable-content-exit-done {
display: none;
}

/* Floating Label */
.p-float-label {
display: block;
position:relative;
}

.p-float-label label {
font-weight:normal;
position:absolute;
pointer-events:none;
left: .25em;
top: 50%;
margin-top: -.5em;
transition: 0.3s ease all;
-moz-transition: 0.3s ease all;
-webkit-transition: 0.3s ease all;
color: #898989;
line-height: 1;
}
19 changes: 0 additions & 19 deletions src/components/inputtext/InputText.css
Original file line number Diff line number Diff line change
Expand Up @@ -89,25 +89,6 @@
}

/* Floating Label */
.p-float-label {
display: block;
position:relative;
}

.p-float-label label {
font-weight:normal;
position:absolute;
pointer-events:none;
left: .25em;
top: 50%;
margin-top: -.5em;
transition: 0.3s ease all;
-moz-transition: 0.3s ease all;
-webkit-transition: 0.3s ease all;
color: #898989;
line-height: 1;
}

.p-float-label input:focus ~ label,
.p-float-label input.p-filled ~ label,
.p-float-label .p-inputwrapper-focus ~ label,
Expand Down
14 changes: 14 additions & 0 deletions src/components/inputtextarea/InputTextarea.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,18 @@

.p-fluid .p-inputtextarea {
width: 100%;
}

/* Floating Label */
.p-float-label textarea:focus ~ label,
.p-float-label textarea.p-filled ~ label,
.p-float-label .p-inputwrapper-focus ~ label,
.p-float-label .p-inputwrapper-filled ~ label {
top:-.75em;
font-size:12px;
}

.p-float-label .textarea:-webkit-autofill ~ label {
top:-20px;
font-size:12px;
}

0 comments on commit 60c0fa4

Please sign in to comment.