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 .list-item display utility #3929

merged 1 commit into from Apr 4, 2021


Copy link

@neupauer neupauer commented Apr 4, 2021

This PR adds .list-item display utility.

It is the default value for the list item.

Adding a display: list-item to the element is useful in situations where you conditionally show/hide an item in the list, or toggling between flex and default behavior.

Also useful when creating fake lists.

E.g.: (This is just an example, I know it can be done like predicate ? '' : 'hidden')

  <li className={predicate ? 'list-item' : 'hidden'}>B</li>
  <div class="list-item">A</div>
  <div class="list-item">B</div>

MDN: display-listitem

Signed-off-by: Peter Neupauer <>
Copy link

adamwathan commented Apr 4, 2021

Looks good, thank you!

@adamwathan adamwathan merged commit 0b5f5e9 into tailwindlabs:master Apr 4, 2021
2 checks passed
adamwathan pushed a commit that referenced this pull request May 7, 2021
Signed-off-by: Peter Neupauer <>
@neupauer neupauer deleted the patch-1 branch Nov 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants