Skip to content

Instantly share code, notes, and snippets.

View jednano's full-sized avatar
💾
Writing codes

Jed jednano

💾
Writing codes
  • Austin, TX
View GitHub Profile
@jednano
jednano / _mixins.scss
Last active August 29, 2015 13:58
Sass mixins
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// ----
@mixin app-font($name, $weight: normal, $style: normal) {
$font-files:
inline-font-files(
'#{$name}.woff', woff
),
@jednano
jednano / logger.js
Created December 5, 2014 23:24
Isomorphic Logger
/*eslint-disable no-console */
var LOG_METHODS = ['debug', 'error', 'info', 'warn'];
function log() {
if (!console || !console.log) {
return;
}
console.log.apply(console, arguments);
}
@jednano
jednano / auto-sprites.scss
Created February 5, 2015 05:48
Auto Spriting
$bem-blocks: (
"foo",
"bar",
"baz"
);
$sprite-files: ();
/*
* Generate BEM-style silent classes for BEM sprites
const checkers = {
isSize(value) {
throw new Error('Not implemented');
},
isStyle(value) {
throw new Error('Not implemented');
},
isVariant(value) {
throw new Error('Not implemented');
},
@jednano
jednano / SassMeister-input.scss
Created September 28, 2015 19:19
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
.catalog-search {
.lines-on-sides {
&:before, &:after {
.catalog-search__grid-title--inline-image & {
top: center;
}
@jednano
jednano / sublime.json
Created June 21, 2013 17:47
In Sublime Text 2, select Preferences >> Settings – User
{
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"ensure_newline_at_eof_on_save": true,
"font_size": 14,
"highlight_line": true,
"ignored_packages": ["Vintage"],
"rulers": [80, 120],
"shift_tab_unindent": true,
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true,
@jednano
jednano / fonts.scss
Last active December 19, 2015 01:09
A SCSS font mix-in that gives you both fast load times and ultimate compatibility.
@import "compass/css3/font-face";
@mixin app-font($name, $weight: normal, $style: normal)
{
$font-files:
inline-font-files(
'#{$name}.woff', woff
),
font-files(
@jednano
jednano / font-helpers.scss
Last active April 22, 2016 04:25
Font Offset
$font-adjustments: (
arial-bold: (
ascender: 0.056,
cap: -0.130,
baseline: -0.154,
descender: 0.056
),
georgia-regular: (
ascender: 0.064,
cap: -0.157,
@jednano
jednano / load-dev-middlewares.js
Last active August 19, 2016 18:37
Webpack Configuration
import { noop } from 'lodash';
import webpack from 'webpack';
import Dashboard from 'webpack-dashboard';
import DashboardPlugin from 'webpack-dashboard/plugin';
import webpackDevMiddleware from 'webpack-dev-middleware';
import webpackHotMiddleware from 'webpack-hot-middleware';
import config from '../webpack.config.dev';
export default function loadDevMiddlewares({ app }) {
@jednano
jednano / postcss-processors.js
Created October 17, 2016 19:13
PostCSS Processors
import { noop } from 'lodash';
import { join } from 'path';
import postcssNested from 'postcss-nested';
import postcssNestedProps from 'postcss-nested-props';
import postcssPropertyLookup from 'postcss-property-lookup';
import variables from './vars.json';
import fonts from './fonts.json';
const browsers = [