Skip to content

Instantly share code, notes, and snippets.

@timschoch
Last active August 29, 2015 14:25
Show Gist options
  • Save timschoch/15bbceca4b2668e7ee41 to your computer and use it in GitHub Desktop.
Save timschoch/15bbceca4b2668e7ee41 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<h1>BoxShadow vs. Borders</h1>
<p>Try it out by clicking on the inputs below:</p>
<div style="width: 200px; float: left">
<input class="boxShadow" placeholder="These Inputs work" />
<input class="boxShadow" placeholder="nicely with" />
<input class="boxShadow" placeholder="animated Borders" />
<input type="submit" value="Submit" />
</div>
<div style="width: 200px; float: left">
<input class="border" placeholder="While these ones" />
<input class="border" placeholder="shift around stuff" />
<input class="border" placeholder="when they're clicked" />
<input type="submit" value="Submit" />
</div>
// ----
// libsass (v3.2.5)
// ----
input {
display: block;
margin-bottom: 10px;
}
// easy
input.boxShadow {
border: none;
box-shadow: 0 1px 0 #999;
transition: box-shadow 0.2s;
&:focus {
box-shadow: 0 4px 0 green;
}
}
// complicated
input.border {
border: none;
border-bottom: 1px solid #999;
transition: border-bottom 0.2s;
&:focus {
border-bottom: 4px solid red;
}
}
input {
display: block;
margin-bottom: 10px;
}
input.boxShadow {
border: none;
box-shadow: 0 1px 0 #999;
transition: box-shadow 0.2s;
}
input.boxShadow:focus {
box-shadow: 0 4px 0 green;
}
input.border {
border: none;
border-bottom: 1px solid #999;
transition: border-bottom 0.2s;
}
input.border:focus {
border-bottom: 4px solid red;
}
<h1>BoxShadow vs. Borders</h1>
<p>Try it out by clicking on the inputs below:</p>
<div style="width: 200px; float: left">
<input class="boxShadow" placeholder="These Inputs work" />
<input class="boxShadow" placeholder="nicely with" />
<input class="boxShadow" placeholder="animated Borders" />
<input type="submit" value="Submit" />
</div>
<div style="width: 200px; float: left">
<input class="border" placeholder="While these ones" />
<input class="border" placeholder="shift around stuff" />
<input class="border" placeholder="when they're clicked" />
<input type="submit" value="Submit" />
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment