From 71a92fdd9470e4edf869e31c4541a3c3d4fa56af Mon Sep 17 00:00:00 2001 From: Chris Yoong Date: Mon, 28 Feb 2022 11:15:36 +0000 Subject: [PATCH] Add rtl langauge support Some language read right to left (rtl) this adds the support isolated to the app for. Example pages https://www.gov.uk/government/news/uk-to-co-host-summit-to-address-afghanistan-humanitarian-crisis-15-february-2022.ar https://www.gov.uk/government/news/welcome-to-our-new-website-gov-uk.ur https://www.gov.uk/government/news/hrh-the-prince-of-wales-makes-a-donation-to-israels-peres-centre.he --- app/assets/stylesheets/print.scss | 2 +- app/assets/stylesheets/print/_language_support.scss | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 app/assets/stylesheets/print/_language_support.scss diff --git a/app/assets/stylesheets/print.scss b/app/assets/stylesheets/print.scss index 9d722958c..ee7ea9786 100644 --- a/app/assets/stylesheets/print.scss +++ b/app/assets/stylesheets/print.scss @@ -6,5 +6,5 @@ @import 'govuk_publishing_components/components/print/step-by-step-nav'; @import 'govuk_publishing_components/components/print/step-by-step-nav-header'; @import 'govuk_publishing_components/components/print/title'; - @import 'print/html-publication'; +@import 'print/language_support'; diff --git a/app/assets/stylesheets/print/_language_support.scss b/app/assets/stylesheets/print/_language_support.scss new file mode 100644 index 000000000..2e44bfba9 --- /dev/null +++ b/app/assets/stylesheets/print/_language_support.scss @@ -0,0 +1,9 @@ +@media print { + // Targeting (right to left) rtl languages + main[lang="ar"], // Arabic + main[lang="he"], // Hebrew + main[lang="ur"] { // Urdu + direction: rtl; + text-align: start; + } +}