Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add text-indent utilities #5449

Merged
merged 1 commit into from
Sep 8, 2021
Merged

Add text-indent utilities #5449

merged 1 commit into from
Sep 8, 2021

Conversation

reinink
Copy link
Member

@reinink reinink commented Sep 8, 2021

This PR adds new text-indent utilities to Tailwind CSS.

<div class="indent-6">
  Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</div>

By default the classes generated for this utility are derived from the theme.spacing section of your tailwind.config.js file, and include the negative versions of those values as well.

<div class="-indent-12">
  Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</div>

The available utilities can be customized under the theme.textIndent section of your tailwind.config.js file.

These utilities also support arbitrary values, so if you need to use another value that doesn't make sense to include in your Tailwind config, you can do this using the square bracket notation:

<div class="indent-[50%]">
  Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</div>

Co-Authored-By: Adam Wathan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant