Skip to content

Instantly share code, notes, and snippets.

@nathansmith
Created October 4, 2010 18:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nathansmith/610220 to your computer and use it in GitHub Desktop.
Save nathansmith/610220 to your computer and use it in GitHub Desktop.
/*
Utility helper classes, to
be sprinkled in as needed.
Mmm... sprinkles!
*/
/* `Text Align + Vertical Align
----------------------------------------------------------------------------------------------------*/
.align_center {
text-align: center !important;
}
.align_right {
text-align: right !important;
}
.align_top,
.align_top th,
.align_top td {
vertical-align: top !important;
}
.align_middle,
.align_middle th,
.align_middle td {
vertical-align: middle !important;
}
.align_bottom,
.align_bottom th,
.align_bottom td {
vertical-align: bottom !important;
}
/* `Positioning
----------------------------------------------------------------------------------------------------*/
.make_relative {
position: relative;
}
.make_block {
display: block;
}
.make_inline {
display: inline;
}
/* `Floats
----------------------------------------------------------------------------------------------------*/
.float_left {
float: left;
}
.float_right {
float: right;
}
/* `Gutters
----------------------------------------------------------------------------------------------------*/
.expand_left {
margin-left: -20px;
}
.expand_right {
margin-right: -20px;
}
.gutter_left {
margin-left: 20px;
}
.gutter_left_half {
margin-left: 10px;
}
.gutter_left_quarter {
margin-left: 5px;
}
.gutter_right {
margin-right: 20px;
}
.gutter_right_half {
margin-right: 10px;
}
.gutter_right_quarter {
margin-right: 5px;
}
.gutter_top {
margin-top: 20px;
}
.gutter_top_half {
margin-top: 10px;
}
.gutter_top_quarter {
margin-top: 5px;
}
.gutter_bottom {
margin-bottom: 20px;
}
.gutter_bottom_half {
margin-bottom: 10px;
}
.gutter_bottom_quarter {
margin-bottom: 5px;
}
.gutter_bottom_none {
margin-bottom: 0;
}
/* `Widths
----------------------------------------------------------------------------------------------------*/
.width_5 {
width: 5%;
}
.width_10 {
width: 10%;
}
.width_15 {
width: 15%;
}
.width_20 {
width: 20%;
}
.width_25 {
width: 25%;
}
.width_30 {
width: 30%;
}
.width_33 {
width: 33.3333%;
}
.width_35 {
width: 35%;
}
.width_40 {
width: 40%;
}
.width_45 {
width: 45%;
}
.width_50 {
width: 50%;
}
.width_55 {
width: 55%;
}
.width_60 {
width: 60%;
}
.width_65 {
width: 65%;
}
.width_66 {
width: 66.6666%;
}
.width_70 {
width: 70%;
}
.width_75 {
width: 75%;
}
.width_80 {
width: 80%;
}
.width_85 {
width: 85%;
}
.width_90 {
width: 90%;
}
.width_95 {
width: 95%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment