View success.js
{
"{\"filename\":\"/Users/huguangju/Programming/github/react/ant-design-pro/src/theme.js\",\"env\":{\"development\":{\"plugins\":[]}},\"retainLines\":false,\"highlightCode\":true,\"suppressDeprecationMessages\":false,\"presets\":[],\"plugins\":[[[],null],[[],null],[[],null],[[],null],[[],null],[[],null],[[],null],[[],null],[[],null],[[],null],[[],null],[[],null],[[],null],[[],null],[[],null],[[],null],[[],null],[[],{\"loose\":false,\"spec\":false}],[[],null],[[],null],[[],{\"spec\":false}],[[],null],[[],{\"loose\":false}],[[],null],[[],null],[[],null],[[],{\"loose\":false}],[[],{\"loose\":false}],[[],null],[[],null],[[],null],[[],{\"loose\":false}],[[],null],[[],{\"loose\":false}],[[],null],[[],null],[[],{\"loose\":false}],[[],{\"async\":false,\"asyncGenerators\":false}]],\"ignore\":[],\"code\":true,\"metadata\":true,\"ast\":true,\"comments\":true,\"compact\":\"auto\",\"minified\":false,\"sourceRoot\":\"/Users/huguangju/Programming/github/react/ant-design-pro/src\",\"babelrc\":false,\"sourceType\":\"modul
View SCSS.md

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

View centerAlign.md

垂直居中

.dad {
    position: relative;
}
.son {
    position: absolute;
    margin: auto;
View 安装node-sass时报错.md
...

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` succeeded python2 /usr/local/opt/pyenv/shims/python2
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /usr/local/opt/pyenv/shims/python2 -c import platform; print(platform.python_version());
gyp ERR! stack pyenv: python2: command not found
gyp ERR! stack
View CSS3ColumnLayout.md

圣杯布局

<div class="container">
    <div class="main"></div>
	<div class="sub"></div>
	<div class="extra"></div>
</div>
View pyenv.md
View isEmptyObject.md

在JavaScript中检测对象是否为空?

方式一

isEmptyObject(obj) {
  Object.keys(obj).length === 0;
}
View checkFileAndCreate.js
var fs = require('fs');
module.exports = function checkFileAndCreate(cb) {
try {
fs.accessSync(file, fs.F_OK);
cb(null);
} catch (err) {
if(err.code === 'ENOENT') {
fs.writeFileSync(file, '');
cb(null);