Skip to content

RTL modal puts header text next to close button #661

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

Open
a-alhusaini opened this issue Mar 13, 2025 · 0 comments
Open

RTL modal puts header text next to close button #661

a-alhusaini opened this issue Mar 13, 2025 · 0 comments

Comments

@a-alhusaini
Copy link

Describe the issue

When creating a modal with the dialog tag. The close button shows up on the right side when dir is set to rtl which makes it show up before the text on the page.

Expected Behavior

The close button for modals should appear on the left when dir is set to rtl.

Image

As you can see here, the close button shows up on the right side instead of the left side as would be expected. The docs mention that float: right; is used to ensure the button stays in that position.

Possible solution

Write a css selector that checks if the dialog or one of its parents has dir="rtl" and set a rule within that selector that stipulates that the close button must be floated to the left in that scenario.

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

1 participant