tailwindlabs / discuss

A place to ask questions, get help, or share what you've built with Tailwind CSS.
MIT License
171 stars 9 forks source link

[Proposal] RTL support #434

Open SasanFarrokh opened 4 years ago

SasanFarrokh commented 4 years ago

Hi,

I had a suggestion, could utility classes use start, end as their directions ? So we can add a config rtl: true to change whole generated css? Something like :

ps-10 // padding start 10
float-end // float end (right in ltr, left in rtl)

Thanks a lot

stevecochrane commented 4 years ago

Hi Sasan,

You might find the tailwindcss-dir plugin useful. It adds new ltr and rtl variants to Tailwind so that you can specify classes like ltr:pl-4 rtl:pr-4 and switch styles based on direction that way.

As for CSS Logical Properties and Values such as padding-inline-start, float: inline-start;, etc., I'm working on a Tailwind plugin for those. It's currently a work in progress, but I hope to get it to a state where I can share it soon, hopefully in the next few weeks or so. When I do I'll post it here on tailwindcss/discuss for feedback.

I hope this helps! Steve