Tailwindcss: How can I add "text-indent" with TailwindCSS

Created on 20 May 2019  路  4Comments  路  Source: tailwindlabs/tailwindcss

Is there any way to add "text-indent" with TailwindCSS ?

Most helpful comment

Yep those will work, or you can just follow the instructions for adding your own utilities in the documentation:

https://tailwindcss.com/docs/adding-new-utilities

All 4 comments

Yep those will work, or you can just follow the instructions for adding your own utilities in the documentation:

https://tailwindcss.com/docs/adding-new-utilities

@adamwathan Is there any way to add the default numbers?

For example widths have the increments 1, 2, 3, 4, 5, 6, 8, 10, ... 56, 64 which correspond to specific rems.

I'd like to be able to make a utility for .indent-1, .indent-2, etc programmatically.

@MarcelloTheArcane Use this plugin:

https://www.npmjs.com/package/tailwindcss-text-indent

...and configure it like this:

// tailwind.config.js
module.exports = {
  theme: {
    textIndent: theme => theme('spacing'),
    // ...
  },
  // ...
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

dbpolito picture dbpolito  路  3Comments

jbardnz picture jbardnz  路  3Comments

AlexVipond picture AlexVipond  路  3Comments

ghost picture ghost  路  3Comments

Quineone picture Quineone  路  3Comments