You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When adding direction: rtl; to the body or dir='rtl' to the html tag it's expected that the animation also follows the other parts of the side bar and become RTL.
Actual Behavior
Instead the animation breaks when opening the menu on mobile devices. it first snaps to the left and then gradually moves right
Screenshots
No response
The text was updated successfully, but these errors were encountered:
The solution to this problem was fairly simple. i tried to create a PR for a fix but realized this is not the repo for components! anyway, in the sidebar class we have this:
hs-overlay-open:translate-x-0 -translate-x-full
which works just fine for LTR but not for RTL. to fix it we have to invert translate for respective mode. we have to invert the -translate-x-full.
so this part of the class should be replaced with this ( at least this is what i came up with and it worked just fine ):
the final class for div with id "hs-sidebar-content-push" in the docs will look like this: hs-overlay [--auto-close:lg] lg:block lg:translate-x-0 lg:start-auto lg:bottom-0 w-64 hs-overlay-open:-translate-x-0 translate-x-full transition-all duration-300 transform h-full hidden fixed top-0 start-0 bottom-0 z-[60] bg-white border-e border-gray-200
here's the screenshot of the modified component ( only the sidebar ):
Summary
Having direction: rtl; in the body breaks sidebar animation
Steps to Reproduce
Demo Link
https://stackblitz.com/edit/vitejs-vite-umxbmzea?file=index.html
Expected Behavior
When adding direction: rtl; to the body or dir='rtl' to the html tag it's expected that the animation also follows the other parts of the side bar and become RTL.
Actual Behavior
Instead the animation breaks when opening the menu on mobile devices. it first snaps to the left and then gradually moves right
Screenshots
No response
The text was updated successfully, but these errors were encountered: