Skip to content

Commit

Permalink
Refactor #1040
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Oct 14, 2019
1 parent 60c0fa4 commit f6ebc0b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/components/common/Common.css
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ button {
position:relative;
}

.p-float-label label {
.p-float-label > label {
font-weight:normal;
position:absolute;
pointer-events:none;
Expand Down
12 changes: 6 additions & 6 deletions src/components/inputtext/InputText.css
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@
}

/* Floating Label */
.p-float-label input:focus ~ label,
.p-float-label input.p-filled ~ label,
.p-float-label .p-inputwrapper-focus ~ label,
.p-float-label .p-inputwrapper-filled ~ label {
.p-float-label > input:focus ~ label,
.p-float-label > input.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 .input:-webkit-autofill ~ label {
top:-20px;
.p-float-label > input:-webkit-autofill ~ label {
top:-.75em;
font-size:12px;
}
15 changes: 9 additions & 6 deletions src/components/inputtextarea/InputTextarea.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,18 @@
}

/* 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 {
.p-float-label > textarea ~ label {
left: .25em;
top: .75em;
}

.p-float-label > textarea:focus ~ label,
.p-float-label > textarea.p-filled ~ label {
top:-.75em;
font-size:12px;
}

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

0 comments on commit f6ebc0b

Please sign in to comment.