Tailwind CSS Text Indent Plugin
This plugin adds utilities to use text-indent with Tailwind CSS.
Installation
Add this plugin to your project:
pnpm install --save-dev tailwindcss-text-indent
npm install --save-dev tailwindcss-text-indent
yarn add -D tailwindcss-text-indent
Usage
{
theme: {
textIndent: (theme, { negative }) => ({
...{
},
...negative({
}),
}),
},
variants: {
textIndent: ['responsive'],
},
plugins: [
require('tailwindcss-text-indent')(),
],
}
.indent-sm { text-indent: 2rem; }
.indent-md { text-indent: 3rem; }
.indent-lg { text-indent: 4rem; }
.-indent-sm { text-indent: -2rem; }
.-indent-md { text-indent: -3rem; }
.-indent-lg { text-indent: -4rem; }