<button class="
rounded-lg border-outline-subtle bg-container state-button p-4 text-start
hover:on-bg-on-surface/hover active:on-bg-on-surface/active
"><div class="m-6 w-xl rounded-xl bg-surface/90 p-6 text-on-surface shadow-xl ring ring-outline-muted">
<h1 class="text-xl font-bold">Example</h1>
<p class="mt-2 mb-4 text-on-surface-muted">
My go-to Tailwind theme, which I developed by copying and pasting it into every new project
and gradually refining it.
</p>
<span class="inline-block rounded-md bg-red-container px-1 font-medium text-red-on-surface"></span>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { readFile } from "node:fs/promises"; | |
| import { relative } from "node:path"; | |
| import { Minimatch } from "minimatch"; | |
| import subsetFont from "subset-font"; | |
| import { Plugin } from "vite"; | |
| export interface SubsetOptions { | |
| codepointsPath: string; | |
| iconsGlob: string; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Config } from "tailwindcss"; | |
| import plugin from "tailwindcss/plugin"; | |
| import { readFileSync, readdirSync } from "fs"; | |
| import { dirname, join } from "path"; | |
| export default { | |
| // ... | |
| plugins: [ | |
| plugin(({ addBase, theme }) => { | |
| const colors = flattenColorPalette(theme("colors")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { formatHex, oklch } from "culori"; | |
| import type { Config } from "tailwindcss"; | |
| import { gray } from "tailwindcss/colors"; | |
| export default { | |
| content: ["index.html", "./src/**/*.{ts,tsx,vue}"], | |
| theme: { | |
| extend: { | |
| colors: { | |
| gray: Object.fromEntries( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| abstract class Property<T = unknown> { | |
| #values: readonly T[]; | |
| constructor(public name: string, values: readonly T[]) { | |
| this.#values = Object.freeze(values); | |
| } | |
| get possibleValues(): readonly T[] { | |
| return this.#values; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as base64url from "https://deno.land/[email protected]/encoding/base64url.ts"; | |
| export interface RsaPrivateKey { | |
| n: bigint; | |
| e: bigint; | |
| d: bigint; | |
| p: bigint; | |
| q: bigint; | |
| dp: bigint; | |
| dq: bigint; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env -S deno run -A | |
| // you might need to specify a different chrome executable because of a bug | |
| // https://github.com/lucacasonato/deno-puppeteer/issues/65 | |
| // PUPPETEER_EXECUTABLE_PATH=/usr/bin/google-chrome-stable (on my linux system) | |
| import { OAuthClient } from "https://deno.land/x/[email protected]/auth/mod.ts"; | |
| import puppeteer from "https://deno.land/x/[email protected]/mod.ts"; | |
| const oauthClient = new OAuthClient({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const lib = Deno.dlopen( | |
| Deno.env.get("DENO_SSL_PATH")!, | |
| { | |
| AES_set_encrypt_key: { | |
| parameters: ["buffer", "u32", "buffer"], | |
| result: "i32", | |
| }, | |
| AES_cfb8_encrypt: { | |
| parameters: [ | |
| "buffer", |
NewerOlder