Skip to content

Instantly share code, notes, and snippets.

View jasonmelgoza's full-sized avatar
🏠
Working from home

Jason Melgoza jasonmelgoza

🏠
Working from home
View GitHub Profile
@jasonmelgoza
jasonmelgoza / toc.scss
Created June 11, 2018 18:26
Table of contents structure for CSS files
/*
1. Policy Dashboard
├── 1.0 Layout styles
├── 1.1 Card lists
├── 1.2 Card titles
├── 1.3 Empty states
└── 1.4 Loading state
*/
/*----------------------------------------------------------------------------
@jasonmelgoza
jasonmelgoza / better-font-smoothing.css
Created June 6, 2018 16:43 — forked from hsleonis/better-font-smoothing.css
Better font smoothing in cross browser
html {
/* Adjust font size */
font-size: 100%;
-webkit-text-size-adjust: 100%;
/* Font varient */
font-variant-ligatures: none;
-webkit-font-variant-ligatures: none;
/* Smoothing */
text-rendering: optimizeLegibility;
-moz-osx-font-smoothing: grayscale;
@jasonmelgoza
jasonmelgoza / space.scss
Created April 26, 2018 17:57
Space variable sheet
$spacer: 8px !default;
$spacers: (
0,
round($spacer / 2),
$spacer,
$spacer * 2,
$spacer * 3,
$spacer * 4,
$spacer * 5
) !default;
@jasonmelgoza
jasonmelgoza / sass.scss
Created April 20, 2018 22:21
Sass manifest structure
/*
1. Basic Styles
├── 1.0 Layout
└── 1.1 Grid
/*----------------------------------------------------------------------------
1. Basic Styles
----------------------------------------------------------------------------*/
@jasonmelgoza
jasonmelgoza / index.js
Created March 22, 2018 16:16
Properties declaration order for CSS
module.exports = {
"plugins": [
"stylelint-no-unsupported-browser-features",
"stylelint-order",
"stylelint-selector-no-utility",
"stylelint-scss",
],
"rules": {
"at-rule-blacklist": ["extend"],
"at-rule-name-case": "lower",
{
"incidents":[
{
"summery":"Example summery triggered",
"time": "January 5, 2018",
"user": "Erica Romaguera",
"details": "Someone is in the hospital."
}
]
}
{
"Policies":[
{
"template":"Tag checker policy",
"description": "Find and report/alert on Missing or invalid tags"
},
{
"template":"Scheduler",
"description": "nill"
},
@jasonmelgoza
jasonmelgoza / build.js
Last active February 8, 2018 05:47
Lodash readme doc script for Node.js
var _ = require('lodash')
var fs = require('fs')
var module = require('./package.json')
// Read external file
var srcCSS = fs.readFileSync('./'+module.name+'.css', 'utf8')
// Read template
var template = fs.readFileSync('./templates/README.md', 'utf8')
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-auto {
flex: 1 1 auto;
min-width: 0;
min-height: 0;
}
.flex-none { flex: none; }
"use strict";
function createEl(template) {
var el = document.createElement('div');
el.innerHTML = template.trim();
return el.firstChild;
}
function createSvgEl(template) {
var el = createEl('\n <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">' + template.trim() + '</svg>\n ');