DEV Community

Discussion on: Life Pro Tips for TailwindCSS Projects

Collapse
lamka02sk profile image
lamka02sk

Aspect ratio is cool, but the browser support isn't. If you are okay with supporting the very few latest versions, then fine, but I would not recommend using it just yet.

Collapse
wadecodez profile image
Wade Zimmerman Author • Edited on

You're right only ~79% of browsers support the CSS aspect-ratio property. Luckily, there is a Tailwind plugin for aspect ratios which uses the padding-bottom hack. This is when insets become handy.

Aspect ratio plugin

Can I use aspect-ratio?

Collapse
lamka02sk profile image
lamka02sk

Thank you, didn't know about the plugin. I will definitely try it

Thread Thread
pavelloz profile image
Paweł Kowalski

Yep, dont forget about that important IE 11 :D

Fun fact: Last month i installed windows with ie 8 and for an hour i didnt manage to either update it to newer version, nor install firefox/chrome. Its so old SSL certificates, broken layouts and network issues made that impossible. I wonder hows life in the ie 11 land nowadays.

Thread Thread
lamka02sk profile image
lamka02sk

It is not about IE11, it is any browser before 2021...

Thread Thread
pavelloz profile image
Paweł Kowalski

Why care about browsers, when we can care about people.