From b23e57d08cd2fbebca19a5d490db0f4d49c1f7e9 Mon Sep 17 00:00:00 2001 From: Xiao YiFang Date: Thu, 27 Oct 2022 21:30:06 +0800 Subject: [PATCH] fix:rtl display in Arabic/Persian language fix goldendict#1565 --- article-style-st-lingoes-blue.css | 2 +- article-style-st-modern.css | 1 - article-style.css | 6 ++++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/article-style-st-lingoes-blue.css b/article-style-st-lingoes-blue.css index 36fe519c..c7b53a8c 100644 --- a/article-style-st-lingoes-blue.css +++ b/article-style-st-lingoes-blue.css @@ -141,7 +141,7 @@ h3 { /* The first headword in a (possibly) multi-headword DSL article */ .gdarticlebody > div:first-child .dsl_headwords, -.gdarticlebody > h3:first-child { +{ margin-top: -3px; display: inline-block; } diff --git a/article-style-st-modern.css b/article-style-st-modern.css index 0380b086..b65160af 100644 --- a/article-style-st-modern.css +++ b/article-style-st-modern.css @@ -155,7 +155,6 @@ a:hover /* The first headword in a (possibly) multi-headword DSL article */ .gdarticlebody > div:first-child .dsl_headwords, -.gdarticlebody > h3:first-child { margin-top: -3px; display: inline-block; diff --git a/article-style.css b/article-style.css index f5f09c1e..5d42e4c5 100644 --- a/article-style.css +++ b/article-style.css @@ -9,6 +9,10 @@ body font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif; } +h1,h2,h3,h4,h5,h6 { + unicode-bidi: plaintext; + text-align: start; +} /* This stylesheet is used to highligh current selection when doing a search. It changes the default selection color (e.g. blue under Windows, orange under Ubuntu) */ @@ -132,6 +136,8 @@ pre /* StarDict type 'h' -- Html content. We don't normally do anything here. */ div.sdct_h { + unicode-bidi: plaintext; + text-align: start; } .sdict_h_wav img