Skip to content

Instantly share code, notes, and snippets.

View mdeltito's full-sized avatar
🥨

Mike Del Tito mdeltito

🥨
View GitHub Profile
@function em($target-size-in-px, $px-context: $base-font-size){
@return #{$target-size-in-px/$px-context}em;
}
@mixin section-flag($color: $accent-blue) {
background: $color;
position: absolute;
top: 0;
left: 0;
margin: 0;
@mdeltito
mdeltito / gist:3249043
Created August 3, 2012 16:08
Vertical Rhythm issue
/* SCSS */
$base-font-size: 16px;
$base-line-height: 24px;
@import "compass/typography/vertical_rhythm";
@include establish-baseline;
#content {
@include adjust-font-size-to(13px);
}
# Make a copy of sprites with a name that has no uniqueness of the hash.
on_sprite_saved do |filename|
if File.exists?(filename)
FileUtils.mv filename, filename.gsub(%r{-s[a-z0-9]{10}\.png$}, '.png')
end
end
# Replace in stylesheets generated references to sprites
# by their counterparts without the hash uniqueness.
on_stylesheet_saved do |filename|
# update PS1 to include git branch
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\[$(tput setaf 3)\]$(__git_ps1)\[$(tput setaf 7)\]$ '