Tailwindcss: Add overflow-x-hidden and overflow-y-hidden

Created on 27 Mar 2018  路  3Comments  路  Source: tailwindlabs/tailwindcss

They're useful because sometimes you want overflow-x-hidden overflow-y-auto (the default overflow-x when overflow-y is set to auto is also auto).

Most helpful comment

I think these should be in the framework 馃憤 Happy to look at a PR!

All 3 comments

Yes! I just had to manually add these to a site I was working on yesterday. I guess @adamwathan will be okay with a PR that includes this as well as tests for them (probably a PR for the docs too).

@benface do you wanna take care of it or should I open the PR myself?

@hacknug Actually after posting this issue I realized this is doable already with the existing classes. Just do:

overflow-hidden overflow-y-auto

or

overflow-hidden overflow-x-auto

Because .overflow-hidden is defined before the .overflow-x-* and .overflow-y-* classes in the CSS, it is overridden by them. So with the snippets above, you effectively get overflow-x: hidden; overflow-y: auto; and overflow-y: hidden; overflow-x: auto; respectively.

I think these should be in the framework 馃憤 Happy to look at a PR!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AlexVipond picture AlexVipond  路  3Comments

dbpolito picture dbpolito  路  3Comments

jbardnz picture jbardnz  路  3Comments

Tjoosten picture Tjoosten  路  3Comments

smbdelse picture smbdelse  路  3Comments