Skip to content

Instantly share code, notes, and snippets.

@yup9
yup9 / 1px border.md
Created June 22, 2017 06:50
Description of gist
background-image
.retina(@top: transparent, @right: transparent, @bottom: transparent, @left: transparent, @w: 1px) {
    @media only screen and (-webkit-min-device-pixel-ratio: 2),
    only screen and (min-device-pixel-ratio: 2) {
        border: none;
		 background-image:
           -webkit-linear-gradient(270deg, @top, @top 50%, transparent 50%),
           -webkit-linear-gradient(180deg, @right, @right 50%, transparent 50%),
@yup9
yup9 / modules.js
Last active August 29, 2015 14:11
javascript modules
//from article http://www.adequatelygood.com/JavaScript-Module-Pattern-In-Depth.html
//一.基本模式
//
//1. 匿名闭包 Anonymous Closures
(function(){
// ... all vars and functions are in this scope only
// still maintains access to all globals
})();