tachyons
tachyons copied to clipboard
Why no max-height?
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.
When writing media queries for restricted heights have you tried this patching utility:https://tachyons-tldr.now.sh/#/tools?
+1 for this, max height would be handy (working on a website with some very tall image assets!)
@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.
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.
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.
Now that’s not nice. Go ahead and compare the file size of Tailwinds (the full, minified source) to Tachyons. Certain sacrifices have been made to keep Tachyons performant, max-height being one of the many things.
I generally only care about adding css classes to Tachyons that are structural or global, i.e., classes that affect layout of multiple components. Max-height is right on the bubble of that, IMO.
On Wed, Aug 7, 2019 at 9:26 AM matsaman [email protected] wrote:
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.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tachyons-css/tachyons/issues/619?email_source=notifications&email_token=AAA7US6YS67BLZFKYLT6Z7TQDLZSNA5CNFSM4HLNI5DKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3Y6ZOY#issuecomment-519171259, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA7USYHCNTRYENKNDG6XKLQDLZSNANCNFSM4HLNI5DA .
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.
@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
@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 ;)