JSFiddle - React, Tailwind, and code Playground
HTML
<div class="page-1">
<form action="#" class="main-form">
<div class="login-form">
<span>
<input id="username" class="email-input" type="email" placeholder="Identifiant" required="">
</span>
<span>
<input id="password" class="pass-input" type="password" placeholder="Mot de passe" required="">
</span>
</div>
</form>
</div>
CSS
.email-input, .pass-input{
width: 20rem;
height: 24px;
border-radius: 0.3rem;
font-size: 17px;
font-weight: 200;
margin: auto;
padding: 0.5rem;
outline: 1px solid rgb(155, 154, 154);
outline-offset: -1px; /* So the middle border doesn't change positions */
border: none;
position: relative;
display: flex;
justify-content: center;
z-index: 1; /* Default z-index */
}
.email-input:active, .email-input:focus{
border: none;
outline: 2px solid #0070c9;
z-index: 2; /* Render the active field on top */
}
.pass-input:active, .pass-input:focus{
border: none;
outline: 2px solid #0070c9;
z-index: 2; /* Render the active field on top */
}
.email-input{
border-bottom-left-radius: 0px;
border-bottom-right-radius: 0px;
}
.pass-input{
border-top-left-radius: 0px;
border-top-right-radius: 0px;
}