Skip to content

Commit a8b8a4d

Browse files
committed
moving the code a little for documentation purpose
1 parent 1b20dbd commit a8b8a4d

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

blocks/form/form.css

+7-6
Original file line numberDiff line numberDiff line change
@@ -554,10 +554,6 @@ main .form :not(.checkbox-wrapper, .radio-wrapper) > label {
554554
margin: 15px 5px 0;
555555
position: absolute;
556556
transition: .3s cubic-bezier(.25,.8,.5,1);
557-
}
558-
559-
main .form [data-empty='true'] > input:not(:focus) {
560-
color: transparent;
561557
}
562558

563559
/* Style for labels when input is active or not empty */
@@ -570,7 +566,8 @@ main .form [data-empty='false'] > label {
570566
z-index: 1;
571567
}
572568

573-
/* remove placeholder when not focused */
569+
/* hide placeholder when not focused */
570+
574571
main .form input:placeholder-shown:not(:focus)::placeholder {
575572
color: transparent;
576573
}
@@ -581,4 +578,8 @@ input[type='date']:not(:focus):in-range::-webkit-datetime-edit-month-field,
581578
input[type='date']:not(:focus):in-range::-webkit-datetime-edit-day-field,
582579
input[type='date']:not(:focus):in-range::-webkit-datetime-edit-text {
583580
color: transparent;
584-
}
581+
}
582+
583+
main .form [data-empty='true'] > input:not(:focus) {
584+
color: transparent; /* for safari and firefox, the webkit styles do not work, hence this is added */
585+
}

0 commit comments

Comments
 (0)