20lives / tailwindcss-rtl

Enabling bidirectional support on tailwindcss framework
MIT License
351 stars 34 forks source link

right-* left-* classes to be start-* and end-* #55

Closed YoussefZidan closed 2 years ago

YoussefZidan commented 2 years ago

Is there a fix for the right-* and left-* classes?

My suggestion is to change the keywords right and left to end and start respectively.

In this manner, the classes will be labelled start-3, end-4, etc.

Alternately, just switch Right/Left according to the parent's direction.

Currently, the solution I came up with is:

<div className="ltr:right-3 rtl:left-3" />
aliakbarazizi commented 2 years ago

Is there a fix for the right-* and left-* classes?

My suggestion is to change the keywords right and left to end and start respectively.

In this manner, the classes will be labelled start-3, end-4, etc.

Alternately, just switch Right/Left according to the parent's direction.

Currently, the solution I came up with is:

<div className="ltr:right-3 rtl:left-3" />

This is actually is in this library. You can use start-3 and end-4 right now.