Skip to content

Instantly share code, notes, and snippets.

@procload
procload / gist:2421232
Created April 19, 2012 14:16
Media Queries in SASS 3.2
// ------------------------------------------- //
// MEDIA QUERIES //
// ------------------------------------------- //
$breakSmall: 320px;
$breakMedium: 560px;
$breakLarge: 1024px;
@mixin respond-to($media) {
@if $media == tiny-screens {
@procload
procload / TM2 Properties File
Created March 21, 2012 15:16
TextMate2 Properties File
# Basic Settings
#
fontName = "Menlo"
fontSize = 13
# Extra files to include
#
myExtraIncludes = ".tm_properties,.htaccess,.gitignore"
fileBrowserGlob = "{*,$myExtraIncludes}"
include = "{$include,$myExtraIncludes}"
<section class="success-stories row">
<div class="story span17">
<div class="row">
<div class="span4">
<div class="thumbnail video-small">
<%= image_tag 'tmp/img-vids1.png', :alt => 'Video Title' %>
</div>
</div>
<div class="span12 offset1">
<h5><%= link_to 'Video Title', '#' %></h5>
@mixin col-border-right($border-width, $border-color) {
border-right: $border-width solid $border-color;
@if $border-width == 1px {
$marginRight: ($gridColumnWidth / 2);
$paddingRight: (($gridColumnWidth + ($gridGutterWidth * 2)) / 2) - $border-width;
padding-right: calc-em($paddingRight, $baseFontSize);
margin-right: calc-em($marginRight, $baseFontSize);
} @else {
$paddingRight: (($gridColumnWidth + ($gridGutterWidth * 2)) / 2) - ($border-width / 2);
$marginRight: ($gridColumnWidth / 2) - ($border-width / 2);
@procload
procload / Grid Backgrounds in Twitter Bootstrap
Created March 6, 2012 18:52
Custom mixin to show grid backgrounds in Twitter Bootstrap
// Show a Grid Background
// **************************************************
// **************************************************
@function build-grid( $total-columns: 19,
$page-width: 930px,
$column-width-percent: 30px,
$gutter-width-percent: 20px,
$column-color: rgba(255,0,255,.05)) {
$i = 0;
$j = 0;
$k = 0
for i in 0..19
$i +=1;
until $j == ($i - 1)
$j +=1;
0 0
0 0
1 0
1 1
2 1
2 2
2 2
@mixin grid-background( $total-columns: $gridColumns,
$grid-column-width: $gridColumnWidth,
$grid-gutter-width: $gridGutterWidth,
//$offset: $grid-background-offset,
$column-color: rgba(255,0,255,.05))
{
//Always transparent white for gutters
$transparent-color: rgba(255,255,255,0);
.plan-type {
font-size: calc-em(16px, $baseFontSize);
line-height: calc-em(18px, 16px);
color: #FFF;
font-weight: 100;
background: #146AA8;
&:nth-of-type(2) {
@include border-radius(4px 0 0 0);
}
&:last-of-type {
# Customize the content that's coming out when hovering over a vcard
vcardContent = (element) ->
content = $(element).children('.additional-details').clone().remove().html();
return content
$('.vcard').popover({
trigger : 'hover',
title : $(this).attr('title'),
content : vcardContent($('.vcard'))
})