View success.js

⇐ back to the gist-blog at

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



.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


<div class="container">
    <div class="main"></div>
	<div class="sub"></div>
	<div class="extra"></div>



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);
} catch (err) {
if(err.code === 'ENOENT') {
fs.writeFileSync(file, '');