JSFiddle - React, Tailwind, and code Playground
by sehsarah
HTML
<body>
<div class="header">
<h1>Title</h1>
<!--<div class="back-button">Back!</div>-->
</div>
<form class="panel">
<fieldset>
<div class="row">
<label>Username</label>
<input type="text" name="ident" />
</div>
<div class="row">
<label>Password</label>
<input type="password" name="password" />
</div>
</fieldset>
</form>
</body>
SCSS
.row {
position: relative;
min-height: 42px;
border-bottom: 1px solid #999;
-webkit-border-radius: 0;
-moz-border-radius: 0;
text-align: right;
}
fieldset > .row:last-child {
border-bottom: none !important;
}
.row > label {
position: absolute;
margin: 0 0 0 14px;
line-height: 42px;
font-weight: bold;
left: 0;
}
.row > input {
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
margin: 0;
border: none;
padding: 0 10px 0 110px;
height: 42px;
background: none;
}
input {
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
width: 100%;
margin: 8px 0 0 0;
padding: 6px 6px 6px 44px;
font-size: 16px;
font-weight: normal;
}
fieldset {
position: relative;
margin: 0 0 20px 0;
padding: 0;
background: white;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border: 1px solid #999;
text-align: right;
font-size: 16px;
border-image: initial;
}
.panel {
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
padding: 100px 10px;
}
body {
font: 13px Arial, Helvetica, MingLiU, sans-serif;
background-color: #007186;
height: 100%;
}
.header {
background-color: #ccc;
background-image: -webkit-gradient(linear, left top, left bottom, from(#ccc), to(#999));
border-color: #666;
border-style: solid;
border-width: 0 0 1px 0;
}
.header h1 {
color: #222;
font-size: 20px;
font-weight: bold;
margin: 0 auto;
padding: 10px 0;
text-align: center;
text-shadow: 0px 1px 0px #fff;
}