Moamen Abdelsattar f16095614c Add dir="auto" to cards for stable card direction (#4428)
Currently, the direction in which a card is rendered is not stable by
default. If the UI of Anki is English, text direction is left-to-right
by default. If the UI of Anki is Arabic, text direction is right-to-left
by default. Although this can be changed from the settings (e.g. by
changing css), the card direction should be stable by default, being
viewed in the same way regardless of the direction of the UI.

The direction of the card must be the same, not dependent on the UI
language.

This commit solves the issue by adding `dir="auto"` by default for all
cards. It will not break existing cards that specify a direction via css
or html, but it will make cards that don't specify a direction stable.

I tested adding `<div dir="auto">` to the card template and found that
it makes the direction stable, regardless of the direction of the UI.

---------

Co-authored-by: Fernando Lins <1887601+fernandolins@users.noreply.github.com>
2026-03-30 10:38:17 -03:00
2026-01-11 18:50:16 +07:00
2025-10-27 19:27:50 +07:00
2025-06-29 14:38:35 +07:00
2026-01-11 18:50:16 +07:00
2025-06-29 22:16:59 +07:00
2025-06-19 14:03:16 +07:00
2025-06-19 14:03:16 +07:00
2025-06-29 14:38:35 +07:00
2025-09-17 16:50:13 +10:00
2025-06-29 22:16:59 +07:00
2025-06-19 14:03:16 +07:00
2018-09-18 10:40:45 +10:00
2025-06-29 14:38:35 +07:00
2025-06-19 14:03:16 +07:00
2021-09-22 22:55:19 +10:00
2024-03-31 09:16:31 +01:00

Anki®

Build status

This repo contains the source code for the computer version of Anki.

About

Anki is a spaced repetition program. Please see the website to learn more.

Getting Started

Anki Betas

If you'd like to try development builds of Anki but don't feel comfortable building the code, please see Anki betas

Developing

For more information on building and developing, please see Development.

Contributing

Want to contribute to Anki? Check out the Contribution Guidelines.

Anki Contributors

CONTRIBUTORS

License

Anki's license: LICENSE

Description
Anki is a smart spaced repetition flashcard program
Readme 126 MiB
Languages
Rust 46.2%
Python 29.3%
Svelte 11.3%
TypeScript 11.1%
SCSS 1%
Other 0.8%