From 673d40dbd0e1a78d449a4e6884d3aed49729b46e Mon Sep 17 00:00:00 2001 From: Amin Sharifi Date: Mon, 23 Oct 2023 18:06:58 +0330 Subject: [PATCH] [ADD] rtl bi-directional support with css and js --- book.toml | 1 + theme/css/rtl-bidi.css | 3 +++ theme/index.hbs | 10 ++++++++++ 3 files changed, 14 insertions(+) create mode 100644 theme/css/rtl-bidi.css diff --git a/book.toml b/book.toml index e24d7804347d..6c9b2ccdfbbe 100644 --- a/book.toml +++ b/book.toml @@ -35,6 +35,7 @@ additional-css = [ "theme/css/speaker-notes.css", "theme/css/language-picker.css", "theme/css/frontmatter.css", + "theme/css/rtl-bidi.css", ] site-url = "/comprehensive-rust/" git-repository-url = "https://github.com/google/comprehensive-rust" diff --git a/theme/css/rtl-bidi.css b/theme/css/rtl-bidi.css new file mode 100644 index 000000000000..1737ed627369 --- /dev/null +++ b/theme/css/rtl-bidi.css @@ -0,0 +1,3 @@ +h1,h2,h3,h4,h5,h6,p,ul,li,details,button,a,ul > li { + unicode-bidi:embed; +} diff --git a/theme/index.hbs b/theme/index.hbs index 7706ae8df09e..35140defb33b 100644 --- a/theme/index.hbs +++ b/theme/index.hbs @@ -403,5 +403,15 @@ {{/if}} +