Skip to content

Instantly share code, notes, and snippets.

View solarsailer's full-sized avatar

Matthieu Oger solarsailer

View GitHub Profile
@solarsailer
solarsailer / _manifest.js
Last active July 31, 2018 14:18
Default global styles for a React app using Styled Components.
import {injectGlobal} from 'styled-components'
import normalize from './normalize'
import base from './base'
import site from './site'
// See: https://github.com/styled-components/styled-components/issues/1109
// -------------------------------------------------------------
// Manifest.
@solarsailer
solarsailer / base.css
Created September 6, 2019 18:13
Default stylesheet for sane defaults.
/**
* Box-model:
* 1. Change default box-model to border-box (the better model).
* 2. All elements will inherit from the <html> box-model.
*/
html {
box-sizing: border-box; /* 1 */
}
@solarsailer
solarsailer / reset.css
Created September 6, 2019 18:31
Minimal reset
/**
* Reset.
*/
h1,
h2,
h3,
h4,
h5,
h6,
@solarsailer
solarsailer / lvha.css
Created September 6, 2019 18:35
LVHA order for predictable colors on links
a {
color: COLOR;
}
a:visited {
color: COLOR; /* Optional, especially on SPA apps. */
}
a:hover {
color: COLOR;
@solarsailer
solarsailer / lvha.css
Created September 6, 2019 18:35
LVHA order for predictable colors on links
a {
color: COLOR;
}
a:visited {
color: COLOR; /* Optional, especially on SPA apps. */
}
a:hover {
color: COLOR;
@solarsailer
solarsailer / pl-convert.js
Last active May 23, 2020 22:28
Create variants for an image (based on https://github.com/tmcw/bespoke)
#!/usr/bin/env node
const fs = require('fs')
const sharp = require('sharp')
const prettyBytes = require('pretty-bytes')
// -------------------------------------------------------------
// Script.
//
// Note: for optimal file sizes, export at highest quality
@solarsailer
solarsailer / utils.js
Created June 15, 2022 10:04
Deno Utility Belt
export async function writeFile(path, content) {
await Deno.writeTextFile(path, content);
}