Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hacknug/tailwindcss-text-indent
Text-indent utilities for Tailwind CSS.
https://github.com/hacknug/tailwindcss-text-indent
Last synced: 18 days ago
JSON representation
Text-indent utilities for Tailwind CSS.
- Host: GitHub
- URL: https://github.com/hacknug/tailwindcss-text-indent
- Owner: hacknug
- Created: 2018-07-06T19:04:16.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-09-24T08:22:45.000Z (about 2 months ago)
- Last Synced: 2024-10-14T10:53:35.919Z (about 1 month ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/tailwindcss-text-indent
- Size: 576 KB
- Stars: 24
- Watchers: 3
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Tailwind CSS Text Indent Plugin
This plugin adds utilities to use text-indent with Tailwind CSS.
## Installation
Add this plugin to your project:
```bash
# Install using pnpm
pnpm install --save-dev tailwindcss-text-indent# Install using npm
npm install --save-dev tailwindcss-text-indent# Install using yarn
yarn add -D tailwindcss-text-indent
```## Usage
```js
// tailwind.config.js
{
theme: { // defaults to these values
textIndent: (theme, { negative }) => ({
...{
// sm: '2rem',
// md: '3rem',
// lg: '4rem',
},
...negative({
// sm: '2rem',
// md: '3rem',
// lg: '4rem',
}),
}),
},variants: { // all the following default to ['responsive']
textIndent: ['responsive'],
},plugins: [
require('tailwindcss-text-indent')(), // no options to configure
],
}
``````css
.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; }
```