Skip to content

bug: Drawer transition is wrong in RTL #1974

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
CripyIce opened this issue Jun 11, 2023 · 4 comments
Closed

bug: Drawer transition is wrong in RTL #1974

CripyIce opened this issue Jun 11, 2023 · 4 comments

Comments

@CripyIce
Copy link

What version of daisyUI are you using?

3.0.25

Describe your issue

When using drawer component in RTL layout, the entering transition is wrong and there is no transition at all on exit.
Just use the example code from the website https://daisyui.com/components/drawer/#responsive while setting dir="rtl" to your html tag and applying the following config:
daisyui: { rtl: true, }

What browsers are you seeing the problem on?

No response

Reproduction URL (optional)

No response

@ariaieboy
Copy link

@CripyIce
Copy link
Author

@ariaieboy Exactly.

@lbensaad
Copy link

the bug disappears and works correctly if you remove daisyui: { rtl: true, } and keep <html dir="rtl">

@HJassar
Copy link

HJassar commented Sep 16, 2023

You can add these lines to app.postcss for a decent result (i.e. the drawer closes abruptly, I couldn't figure this one out).

@layer utilities {
	.drawer-side {
		@apply z-50;
	}

	[dir='rtl'] .drawer-toggle ~ .drawer-side {
		@apply -translate-x-[100%];
	}

	[dir='rtl'] .drawer-toggle:checked ~ .drawer-side {
		@apply translate-x-0;
	}

	[dir='rtl'] .drawer-side > *:not(.drawer-overlay) {
		@apply translate-x-[100%];
	}
	[dir='rtl'] .drawer-open > .drawer-side {
		@apply translate-x-[0];
	}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants