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

Why no max-height? #619

Open
JonKrone opened this issue May 7, 2019 · 9 comments
Open

Why no max-height? #619

JonKrone opened this issue May 7, 2019 · 9 comments

Comments

@JonKrone
Copy link

JonKrone commented May 7, 2019

Hello hello,

Is there a particular reason that there are no max-h-X classes? I've searched around and failed to find a reference to it being some frowned-upon CSS attribute or that y'all've explicitly decided not to include it.

The case that I've come across a few times is that I have a dropdown which contains a long list of items that I want to constrain to some max-height. I could just set height but of course that would make small lists look bad.

Would love to hear your thoughts, and/or would be happy to contribute a max-h-X set of classes to mimic the values of the mwX ones.

@inspiredlabs
Copy link

inspiredlabs commented May 30, 2019

When writing media queries for restricted heights have you tried this patching utility:https://tachyons-tldr.now.sh/#/tools?

@j-greig
Copy link

j-greig commented Jun 17, 2019

+1 for this, max height would be handy (working on a website with some very tall image assets!)

@JonKrone
Copy link
Author

JonKrone commented Jun 21, 2019

@inspiredlabs I don't understand your suggestion. Could you clarify what you mean? I don't have a need for mediaqueries for constraining the height of the dropdown.

@jay-meister
Copy link

Yes it would be great to have max-height, or at least some info as to why it wasn't included and what a suitable solution to the varying dropdown height problem @JonKrone has described.

@matsaman
Copy link

matsaman commented Aug 7, 2019

Yes, max-height and the other million things that are missing. The only thing more obnoxious than libraries like these are that they aren't even comprehensive, so you can't even waste your time completely converting your approach, because you always have to still use additional plain CSS.

@dangayle
Copy link
Contributor

dangayle commented Aug 7, 2019 via email

@cristianofromagio
Copy link

This was already discussed (kind of). On #222 an issue was created to suggest the creation of min-height: 100%, with a reasonable argument (read the issue). Then #263 suggested to add more min-height values but @mrmrs closed the issue, not adding the additional classes rightly so as BDFL. This issue response might clarify the team position on this matter. In my opinion, this is a "project edge-case" that you might be better writing your own classes and extending the scope of tachyons to your own needs than adding these to tachyons' core.

@jay-meister
Copy link

@cristianofromagio what is the best way to edit/extend tachyons?

I had a look, but didn’t find any clear advice. Could you point me in the right direction?

Ta

@colindensem
Copy link

@JMurphyWeb no idea if it's the best way: I create a tachyons-extensions file, included before the main tachyons files. Then I add either a very project specific extensions/overrides like widths dy-w1 dy-w2 which behave differently to the default w1, w2. Or in this case where there is less chance of a direct conflict a tachyons style name of .max-vh-75. Also then one file to check for 'extensions' and it's never got too much in it, less is more ;)

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

No branches or pull requests

8 participants