What I am trying to do is change the label font color and border color when the input field is focused. Is there a way to make that happen without using JavaScript?
.input-label {
display: flex;
align-items: center;
height: 16px;
font-weight: 700;
font-size: 11px;
letter-spacing: .1px;
color: #989898;
text-transform: uppercase;
}
.form-control{
display: inline-block;
max-width: 100%;
word-wrap: normal;
background: transparent;
border: none;
border-bottom: 2px solid #cacaca;
color: #4a4a4a;
font-size: 1.19em;
height: 35px;
letter-spacing: .2px;
padding: 7px 0;
width: 100%;
resize: none;
}
input:focus{
/* after the input is focused the labele font color and border color change to something else*/
}
<div class="firstname">
<label for="name" class="input-label" id="name-label">First Name</label>
<input type="text" class="form-control" id="name" placeholder="First Name" required>
</div>