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 max-h-[0-9-xl] utilities #1374

Open
soullivaneuh opened this issue Feb 9, 2020 · 2 comments
Open

Add max-h-[0-9-xl] utilities #1374

soullivaneuh opened this issue Feb 9, 2020 · 2 comments

Comments

@soullivaneuh
Copy link

@soullivaneuh soullivaneuh commented Feb 9, 2020

Basically, the same thing than that: https://tailwindcss.com/docs/max-width/#app

But for height.

I might add it on a tailwindcss config file, but I'm working on an open-source svelte library based on Tailwind, and I would keep the strict default config to be flexible.

This will be useful to set the max height of a dropdown. Currently, I have to do this:

.list {
  max-height: 16rem;
}
@hunzaboy
Copy link

@hunzaboy hunzaboy commented Mar 3, 2020

You can use the height on the parent and then use max-height in the child.

h-64 = 16rem;
e.g

<div class="h-64 list">
  <div class="max-h-full ...">
    max-h-full
  </div>
</div
@kyleoliveiro
Copy link

@kyleoliveiro kyleoliveiro commented Mar 25, 2020

You can use the height on the parent and then use max-height in the child.

h-64 = 16rem;
e.g

<div class="h-64 list">
  <div class="max-h-full ...">
    max-h-full
  </div>
</div

In that case the parent will occupy more space than intended if the child is shorter than 16rem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.