Skip to content

Instantly share code, notes, and snippets.

@evanshajed
evanshajed / genignore
Created March 31, 2017 10:33
general gitignore file
/sftpCache.json
# Compass / Sass #
##################
.sass-cache
*.scssc
*.sassc
# SublimeText project files
*.sublime-workspace
@evanshajed
evanshajed / device-media-queries.css
Created February 29, 2016 13:11
Media Queries for Devices
/* ----------- iPhone 4 and 4S ----------- */
/* Portrait and Landscape */
@media only screen
and (min-device-width: 320px)
and (max-device-width: 480px)
and (-webkit-min-device-pixel-ratio: 2) {
}
/* ---------------------------------------------------------- */
/* */
/* A media query that captures: */
/* */
/* - Retina iOS devices */
/* - Retina Macs running Safari */
/* - High DPI Windows PCs running IE 8 and above */
/* - Low DPI Windows PCs running IE, zoomed in */
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */
/* - Android hdpi devices and above */

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@evanshajed
evanshajed / dabblet.css
Created July 29, 2013 11:46 — forked from LeaVerou/dabblet.css
Loading animation like the one seen on http://www.freeger.com/projects/contextad/ with CSS
/**
* Loading animation like the one seen on http://www.freeger.com/projects/contextad/ with CSS
* Caveat: Not DRY. The content needs to be repeated in a data- attribute (or directly in the CSS).
*/
body {
background: #ccc51c;
min-height: 100%;
}
@evanshajed
evanshajed / sass-media-breakpoint.scss
Last active December 17, 2015 11:19
@media break point in SASS for standard devices
/*
* By Shajed Evan @evanshajed
* Concept by: CHRIS COYIER @chriscoyier
// Breakpoints
@mixin breakpoint($point) {
/* Smartphones (portrait and landscape) ----------- */
@if $point == sp-portrait-lanscape {
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) { @content; }
@evanshajed
evanshajed / sass-retina-sprite-mixin.scss
Last active December 15, 2015 12:38
SASS MIXIN for Retina Image Sprite
// SASS MIXIN for Retina Image Sprite
@mixin retina-sprite-background($name,$normal,$retina){
background-repeat: no-repeat;
background-image: sprite-url($normal);
background-position: sprite-position($normal,$name);
height:image-height(sprite-file($normal, $name));
width: image-width(sprite-file($normal, $name));
// Media Query for retina
/* Mixin for Compass - border-image
$border-image([$image-url], [$offsets], [$repeats])
Example:
@include border-image(url(../my_image.png), 10, stretch)
@include border-image(url(../my_image.png), 10 5 10 5, stretch repeat)
---------------------------------------- */
@mixin border-image($url, $offsets, $repeats) {
/**
* PE to use SVG as CSS background image with fallback for IE8/7/6
*
* Using SVG as CSS background image to display
* resolution-independent logos or icons is pretty
* awesome but does completely fail on IE8/7/6
*
* The trick:
* All three IE versions don't support rgba color values.
* By defining a rgba background color together with the
@evanshajed
evanshajed / google-font-loading-class.css
Created January 18, 2013 15:40
CSS loading classes for Google Web Fonts Loader
.wf-loading .class-name li a{ visibility: visible; }
.wf-inactive .class-name li a{ visibility: visible; }
.wf-active .class-name li a{ font-family: 'Ubuntu Condensed', sans-serif; }