JSFiddle - React, Tailwind, and code Playground
by David Thomas
HTML
<form action="#" method="post">
<label for="uName">User</label>
<input id="uName" />
<label for="pass">Password</label>
<input type="password" id="pass" />
</form>
CSS
form {
padding: 1em;
}
label,
input {
float: left;
border: 1px solid #999;
line-height: 1.2em;
padding: 0.2em 0;
font-size: 1em;
height: 1.4em;
margin-bottom: 0.8em;
}
input + label {
clear: left;
}
label {
text-indent: 0.5em;
width: 30%;
border-radius: 0.5em 0 0 0.5em;
}
input {
width: 60%;
border-radius: 0 0.5em 0.5em 0;
outline: none;
}
input:focus,
input:active {
box-shadow: inset 0 0 5px #55f;
}