-
Notifications
You must be signed in to change notification settings - Fork 8
Conversation
index.js
Outdated
items.forEach((item) => { | ||
if (isRTL(item.innerText)) { | ||
item.style['text-align'] = 'right'; | ||
} | ||
}); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @dotanrs
Thanks for your contribution and consideration here.
What do you think of using text-align: start;
instead?
This should allow us to avoid checking if it's RTL/LTR. This is in line with the approach that we are already using with direction (auto, let the browser handle it).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love it. Changed it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dotanrs Looks good to me, can we just match the rest of the code and remove the semicolons? I'll setup a script in package.json to use Prettier to automatically do that and lint future PRs.
Thank you so much for finding and fixing this issue!
@obahareth sure thing, semicolons are removed 👍 |
Awesome @dotanrs, I'll push a new version later in my evening today. |
@all-contributors please add @dotanrs for code contributions. |
I've put up a pull request to add @dotanrs! 🎉 |
@all-contributors please add @EhsanZ for review contributions. |
I've put up a pull request to add @EhsanZ! 🎉 |
This fixes the display of list items, which would still be aligned to the left despite being in
dir=rtl