Skip to content

Instantly share code, notes, and snippets.

View zaydek's full-sized avatar
🤠
Howdy!

Z 🏴‍☠️ zaydek

🤠
Howdy!
View GitHub Profile
@zaydek
zaydek / run.sh
Last active September 6, 2020 14:01
Documents a dark mode bug in Tailwind CSS 1.8.3 (missing dark:bg-* classes).
yarn tailwind build -c tailwind.test.config.js -o test.output
@zaydek
zaydek / test.md
Last active August 12, 2020 12:40

**Test** -> <strong>test</strong>

import React from "react"
import uuid from "uuid/v4"
import { useImmerReducer } from "use-immer"
// Asserts on undefined, false, -1, null.
function assert(value) {
if (value !== undefined && value !== false && value !== -1 && value !== null) {
return
}
throw new Error(`assert: value assertion; value=${value}`)
const defaultTheme = require("tailwindcss/defaultTheme")
function trimWhitespace(str) {
return str.split(/\s+/).join(" ").trim()
}
module.exports = {
purge: [
"./public/**/*.html",
"./src/**/*.js",
Details Something small enough to escape casual notice.

Hello, world!

.prose {
color: #4a5568;
max-width: 65ch;
}
.prose [class~=lead] {
color: #4a5568;
font-size: 1.25em;
line-height: 1.6;
margin-top: 1.2em;
margin-bottom: 1.2em;
import useMethods from "use-methods"
// NOTE: The following imports are intentionally unsorted.
import {
lock,
unlock,
} from "./lock"
import {
focus,
import areEqualJSON from "lib/areEqualJSON"
import omitKey from "lib/omitKey"
import React from "react"
import toArray from "lib/toArray"
import { typeMap } from "./typeMaps"
// Converts intermediary elements to React elements.
function toReactElements(elements) {
const reactElements = []
for (const each of toArray(elements)) {
@zaydek
zaydek / onBeforeInput.js
Created June 7, 2020 19:07
onBeforeInput research -- onBeforeInput does not appear to be stable for int.l input; characters easily get mangled because there are _phantom_ positions for where composition starts (that do not have 1:1 correspondence with the cursor’s offsets) and is hard to maintain. Because browsers can (not tested, but probably) differ on the order of inpu…
// import App from "EditorApp/EditorApp"
// import React from "react"
// import ReactDOM from "react-dom"
//
// import "debug.css"
// import "stylesheets/prism/custom.css"
// import "stylesheets/tailwind/color-vars.css"
// import "stylesheets/tailwind/em-context.css"
// import "stylesheets/tailwind/tailwind.generated.css"
//