Skip to content
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

How to set the text direction? #902

Closed
4 tasks done
xfq opened this issue Jul 3, 2022 · 1 comment · Fixed by #1339
Closed
4 tasks done

How to set the text direction? #902

xfq opened this issue Jul 3, 2022 · 1 comment · Fixed by #1339
Labels
enhancement New feature or request

Comments

@xfq
Copy link
Contributor

xfq commented Jul 3, 2022

Is your feature request related to a problem? Please describe.

There is currently no easy way to set the text direction of an entire website. While it is possible to add global CSS, that is not the recommended approach.

Describe the solution you'd like

It would be useful to add a config to set dir="ltr/rtl" of the <html> element, so that docs written in RTL scripts using VP can be better supported.

Describe alternatives you've considered

Use the CSS direction property to customize the theme.

Additional context

No response

Validations

@brc-dd brc-dd added the enhancement New feature or request label Jul 3, 2022
@xfq
Copy link
Contributor Author

xfq commented Jul 22, 2022

The UI also needs to adapt automatically, for example, the sidebar on the left should change to the right in dir="rtl".

If VitePress uses CSS Logical Properties and Values (I haven't checked yet), there shouldn't be many changes that need to be made.

@brc-dd brc-dd mentioned this issue Sep 14, 2022
12 tasks
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants