Skip to content

Instantly share code, notes, and snippets.

@shubie
shubie / tailwindForms.js
Created September 22, 2024 04:06 — forked from srcrip/tailwindForms.js
This is just a copy-and-paste of the Tailwind Forms plugin that you can actually edit/customize/maintain + JSDoc types.
// Tailwind plugin for forms.
// Basically: https://github.com/tailwindlabs/tailwindcss-forms/blob/main/src/index.js
// But with a few changes. And it's easier to maintain this way.
const svgToDataUri = require("mini-svg-data-uri")
const plugin = require("tailwindcss/plugin")
const defaultTheme = require("tailwindcss/defaultTheme")
const colors = require("tailwindcss/colors")
const [baseFontSize, { lineHeight: baseLineHeight }] =
defaultTheme.fontSize.base
const { spacing, borderWidth, borderRadius } = defaultTheme