Skip to content

Instantly share code, notes, and snippets.

View nathanieldeal's full-sized avatar

Nathaniel Deal nathanieldeal

View GitHub Profile
@nathanieldeal
nathanieldeal / .gitignore
Created August 7, 2015 20:51
gitignore for wp-content
wp-content/blogs.dir/
wp-content/upgrade/
wp-content/backup-db/
wp-content/advanced-cache.php
wp-content/wp-cache-config.php
sitemap.xml
*.log
/wp-*.php
/index.php
license.txt
@nathanieldeal
nathanieldeal / Responsive Vertical Alignment
Last active July 6, 2020 00:03
Vertically align anything responsive in any size with CSS
.parent {
height: 100%;
position: relative;
}
.parent .element {
top:50%;
-webkit-transform:translateY(-50%);
-moz-transform:translateY(-50%);
-ms-transform:translateY(-50%);
@nathanieldeal
nathanieldeal / Compass Sprite Snippet
Last active January 3, 2016 03:19
Sass snippet to generate sprites using CompassCompass Sprite Snippet
@import "compass"
$icons: sprite-map("icons/*.png")
i
background: $icons
display: inline-block
@each $i in sprite_names($icons)
.icn-#{$i}
background-position: sprite-position($icons, $i)