In the example page for the floating label, there is a label selector for when the place holder is not shown:
.form-label-group input:not(:placeholder-shown) ~ label {
padding-top: calc(var(--input-padding-y) / 3);
padding-bottom: calc(var(--input-padding-y) / 3);
font-size: 12px;
color: #777;
}
this selector is based on this HTML structure:
<div class="form-label-group">
<input type="email" id="inputEmail" class="form-control" placeholder="Email">
<label for="inputEmail">Email</label>
</div>
I have a label with input which is in this structure:
<div id="" class="form-label-group ">
<div class="form-before-field">
</div>
<div class="form-field">
<div id="form-wrap" class="field-wrap" data-field-id="1">
<div class="field-label">
<label for="field-1" class="">Name </label>
</div>
<div class="field-element">
<input type="text" value="" class="forms-field form-control" placeholder="Name" id="field-1" name="field-1" aria-invalid="false" aria-describedby="error-1">
</div>
</div>
</div>
<div class="after-field">
<section>
<div class="input-limit"></div>
<div id="error-1" class="error-wrap error" role="alert"></div>
</section>
</div>
</div>
what selector should I use to target the label when the place holder is not shown?