Skip to content

Instantly share code, notes, and snippets.

@nickawalsh
nickawalsh / icons.sass
Last active Oct 7, 2021
Auto Hi-res Sprites
View icons.sass
@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
View terminal2.txt
> 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
View terminal.txt
> 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!"
View _settings.sass
%debug
background-color: pink !important
View input.sass
// -------------------------------------
// Vars
// -------------------------------------
$c-base: #333
$c-action: #ff971c
$c-keys: $c-base, $c-action
$c-registry: ()
View _grids.sass
//------------------------------------------------------
// 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
View _settings.sass
=respond-to($val, $query: min-width, $media: screen)
@media #{$media} and ($query: $val)
@content
@nickawalsh
nickawalsh / _settings.sass
Last active Oct 8, 2015
Serve IE Responsive Desktop Version
View _settings.sass
=respond-to($value, $query: min-width, $ie: false)
@media ($query: $value)
@content
@if $ie
.ie &
@content
View gist:2923581
/* 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