Skip to content

Instantly share code, notes, and snippets.

View miekd's full-sized avatar
📷

Maykel Loomans miekd

📷
View GitHub Profile
@SimplGy
SimplGy / 2xBackground
Created August 12, 2013 18:42
Creates 1x and 2x background images. The 200% means that the pixel offsets will work on both the small and large images. Make sure your sprites line up exactly, so that the 2x images are exactly twice as big, twice as low, and twice as left.
//Support 1 and 2x image sizes
@mixin 2xBackground($url)
background-image: url($url + ".png")
@media only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen and (min-device-pixel-ratio: 1.3)
background-image: url($url + "@2x.png")
background-size: 200%
@subtleGradient
subtleGradient / Behavior.framer.js
Last active July 28, 2017 17:27
Simple Behavior sheet system for FramerJS. Allows you to apply pre-defined behaviors to your layers by changing the layer name. by Thomas Aylott (http://subtlegradient.com) Copyright 2013 Facebook. All rights reserved. MIT License.
function Behavior(PSD){
var _BehaviorNames = Object.keys(Behavior.behaviors)
.filter(function(BehaviorName){ return !!Behavior.behaviors[BehaviorName].namingPattern });
Object.keys(PSD).forEach(function(layerName){
var layer = PSD[layerName];
_BehaviorNames.forEach(function(BehaviorName){
var match = layerName.match(Behavior.behaviors[BehaviorName].namingPattern);
try {