Skip to content

Instantly share code, notes, and snippets.

@nickawalsh
nickawalsh / gist:2923581
Created June 13, 2012 11:41
Pseudo Caret
/* Sample usage: +caret(bottom, 8px, #000); */
=caret($side, $size, $color)
$opposite: opposite-position($side)
+stretch(50%,auto,auto,50%)
border: $size solid transparent
border-#{$opposite}: $size solid $color
border-#{$side}: 0
content: ''
display: block
@nickawalsh
nickawalsh / _settings.sass
Last active October 8, 2015 05:28
Serve IE Responsive Desktop Version
=respond-to($value, $query: min-width, $ie: false)
@media ($query: $value)
@content
@if $ie
.ie &
@content
@nickawalsh
nickawalsh / _settings.sass
Created August 24, 2012 09:55
Style Debugging
%debug
background-color: pink !important
@nickawalsh
nickawalsh / _settings.sass
Created August 24, 2012 11:12
Respond-to
=respond-to($val, $query: min-width, $media: screen)
@media #{$media} and ($query: $val)
@content
@nickawalsh
nickawalsh / icons.sass
Last active October 7, 2021 09:38
Auto Hi-res Sprites
@import compass
$icons: sprite-map("icons/*.png")
$icons-hd: sprite-map("icons-hd/*.png")
i
background: $icons
display: inline-block
@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi)
background: $icons-hd
@nickawalsh
nickawalsh / _grids.sass
Last active December 13, 2015 22:38
Grids
//------------------------------------------------------
// Grids
//
// Based on the following:
// * https://github.com/necolas/suit-grid
// * https://github.com/csswizardry/csswizardry-grids
//------------------------------------------------------
$grid-columns: 12 !default
$grid-defaults: "lap" 480px, "desk" 800px !default
@nickawalsh
nickawalsh / input.sass
Created December 5, 2013 15:25
Color Registry
// -------------------------------------
// Vars
// -------------------------------------
$c-base: #333
$c-action: #ff971c
$c-keys: $c-base, $c-action
$c-registry: ()
> git blame hello_world.rb
7d7a2585 (Nick Walsh 2021-07-13 10:53:49 -0400 1) puts "Hello World!"
64bf7547 (Matt Schultz 2021-07-16 10:55:59 -0400 2) puts "Legacy Software isn't so bad!"
> git diff e26004dc 64bf7547
diff --git a/hello_world.rb b/hello_world.rb
index 01a178a..367d6a5 100644
--- a/hello_world.rb
+++ b/hello_world.rb