Skip to content

Instantly share code, notes, and snippets.

View lessallan's full-sized avatar

Allan Branch lessallan

View GitHub Profile
=lesscolumns($width_of_page :960px, $number_of_columns :4, $column_padding :10px, $width_of_gutter :10px, $border_width :0px, $border_style :solid, $border_color :#333)
$number_of_gutters: $number_of_columns - 1
$width_of_column: ($width_of_page - ($width_of_gutter * $number_of_gutters)) / $number_of_columns - ($column_padding * 2) - ($border_width * 2)
width: $width_of_page
+pie-clearfix
> *
width: $width_of_column
margin-left: $width_of_gutter
padding: $column_padding
border: $border_width $border_style $border_color
$big_column: 600px
$form_column: $big_column / 6
$field_padding: 20px
$width1: $form_column
$width2: $form_column * 2
$width3: $form_column * 3
$input_width1: $width1 - ($field_padding / 2)
$input_width2: $width2 - ($field_padding / 2)
$input_width3: $width3 - ($field_padding / 2)
@lessallan
lessallan / friendshiptest
Created March 24, 2012 00:28
@AllanBranch's Friendship Test
Each line below is worth a different point amount.
3 points = We've had a short phone call.
7 points = We've met in person, briefly.
12 points = We've met in person and shared a meal or had over an hour long discussion.
12 points = You've asked me about my family or wished me happy birthday, in person, phone or email.
100 points = We've shared a hotel room.
1 points = We've talked via a social network.
2 points = We've exchanged a few emails.
100 points = I've farted in front of you.
@lessallan
lessallan / AHHHHHHH
Created August 21, 2012 17:55
@for sass function issue
$color_2: lighten(#026dbd, 45%)
$color_3: lighten(#fad52c, 20%)
$color_4: lighten(#f17d32, 20%)
$color_5: lighten(#da1c1c, 25%)
$color_6: lighten(#8266ba, 20%)
$color_7: lighten(#7bb545, 17%)
@for $i from 2 through 7
&:nth-child(#{$i})
background-color: $color_#{$i}
@lessallan
lessallan / sassforpictos
Created August 30, 2012 14:23
pictos server setup in sass file
[data-icon]:before
font-family: 'Pictos Custom'
content: attr(data-icon)
-webkit-font-smoothing: antialiased
font-weight: normal
@lessallan
lessallan / hamlforpictos
Created August 30, 2012 14:31
haml for Pictos
%span{:"data-icon" =>'m'}
%span{:"data-icon" =>'e'}
%span{:"data-icon" =>'t'}
@lessallan
lessallan / sasstocontrolsize
Created August 30, 2012 14:35
Sass to Control Pictos Icon Sizes
span
color: #777
font-size: 17px
@lessallan
lessallan / each_sass
Created September 7, 2012 18:37
@each is killing me, help.
$dashboard_base: #ff0000
$transaction_base: #00ff00
$invoices_base: #ffff00
$reports_base: #0000ff
$settings_base: #00ffff
$contacts_base: #ff7700
$dashboard: lighten($dashboard_base, 40%)
$transaction: lighten($transaction_base, 37%)
$invoice: lighten($invoices_base, 35%)
<ul>
<li> list item one</li>
<li> list item two</li>
<li> list item three</li>
<li>list item four</li>
</ul>
@for $i from 1 through 35
.picture:nth-child($i)
+animate(fadeIn, 1s, ($i)s)