Skip to content

Instantly share code, notes, and snippets.

View aekaplan's full-sized avatar

Adam Kaplan aekaplan

View GitHub Profile
@aekaplan
aekaplan / gist:5682842
Last active December 17, 2015 22:29
Pseudo-Classes 6 CSS
.column-example-bad {
float: left;
margin-left: 3.2%;
width: 31.2%;
}
.first {
border: 1px solid #008080;
margin-left: 0
}
@aekaplan
aekaplan / gist:5682833
Last active December 17, 2015 22:29
Pseudo-Classes 5 HTML
<div class="row">
<div class="column-example-bad first">
<p>Column 1</p>
</div>
<div class="column-example-bad">
<p>Column 2</p>
</div>
<div class="column-example-bad">
@aekaplan
aekaplan / gist:5682773
Last active December 17, 2015 22:29
Pseudo-Classes 7 CSS
.column-example {
float: left;
margin-left: 3.2%;
width: 31.2%;
}
.column-example:first-child {
border: 1px solid #008080;
margin-left: 0;
}
@aekaplan
aekaplan / gist:5679831
Last active December 17, 2015 22:09
Pseudo-Classes 1 CSS
p.example:before {
background: #d31742;
content: "before";
color: #fff;
padding: 0 0.3em;
}
p.example:after {
background: #d31742;
content: "after";
@aekaplan
aekaplan / gist:5680048
Last active December 17, 2015 22:09
Pseudo-Classes 4 CSS
.cf:before,
.cf:after {
content: " ";
display: table;
}
.cf:after {
clear: both;
}
@aekaplan
aekaplan / gist:5679880
Last active December 17, 2015 22:09
Pseudo-Classes 2 CSS
ul.example li:before {
content: "★";
color: #d31742;
padding-right: 0.5em;
}
@aekaplan
aekaplan / gist:5679711
Last active December 17, 2015 22:09
Pseudo-Classes 3 CSS
.timeline:before {
background: #ddd;
content: " ";
position: absolute;
top: 20px;
left: 31%;
bottom: 0;
width: 1px;
}
@aekaplan
aekaplan / gist:5645883
Created May 24, 2013 19:18
Label HTML
<form>
<label>First Name</label>
<input type="text" placeholder="Adam"></input>
<label>Last Name</label>
<input type="text" placeholder="Kaplan"></input>
</form>
@aekaplan
aekaplan / gist:5640867
Last active December 17, 2015 16:39
Input Text SCSS
@mixin transition {
-moz-transition: 0.4s background, 0.4s border-color;
-webkit-transition: 0.4s background, 0.4s border-color;
transition: 0.4s background, 0.4s border-color;
}
@mixin border-radius {
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
@aekaplan
aekaplan / gist:5636900
Last active December 17, 2015 16:09
Inputs CSS
input[type="text"] {
background: #fff;
border: 1px solid #ddd;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
color: #555;
display: block;
margin-bottom: 1em;
padding: 0.5em;