From 904e077b74547ee966fd756246284b18c6ad1d99 Mon Sep 17 00:00:00 2001 From: Azzam Alsharafi <32015536+AzzamAlsharafi@users.noreply.github.com> Date: Thu, 19 Dec 2024 15:24:21 +0800 Subject: [PATCH] Fix top nav bar layout in RTL languages Modify the margin direction in RTL layouts, and replace some occurrences of space-x to gap-x, for better RTL handling --- assets/css/compiled/main.css | 22 ++++++++++++++-------- layouts/partials/header/basic.html | 12 ++++++------ layouts/partials/translations.html | 2 +- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index a84fb5ed..9e6119a5 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -1616,10 +1616,6 @@ select { margin-left:-3rem } -.-mr-2 { - margin-right:-0.5rem -} - .-mr-48 { margin-right:-12rem } @@ -2163,6 +2159,16 @@ select { gap:1rem } +.gap-x-3 { + -moz-column-gap:0.75rem; + column-gap:0.75rem +} + +.gap-x-5 { + -moz-column-gap:1.25rem; + column-gap:1.25rem +} + .space-x-2 > :not([hidden]) ~ :not([hidden]) { --tw-space-x-reverse:0; margin-right:calc(0.5rem * var(--tw-space-x-reverse)); @@ -5494,8 +5500,8 @@ pre { margin-left:0.5rem } -.ltr\:mr-14:where([dir="ltr"], [dir="ltr"] *) { - margin-right:3.5rem +.ltr\:mr-1:where([dir="ltr"], [dir="ltr"] *) { + margin-right:0.25rem } .ltr\:mr-4:where([dir="ltr"], [dir="ltr"] *) { @@ -5562,8 +5568,8 @@ pre { margin-right:-1.25rem } -.rtl\:ml-14:where([dir="rtl"], [dir="rtl"] *) { - margin-left:3.5rem +.rtl\:ml-1:where([dir="rtl"], [dir="rtl"] *) { + margin-left:0.25rem } .rtl\:ml-4:where([dir="rtl"], [dir="rtl"] *) { diff --git a/layouts/partials/header/basic.html b/layouts/partials/header/basic.html index c1eb4641..53357f0c 100644 --- a/layouts/partials/header/basic.html +++ b/layouts/partials/header/basic.html @@ -1,5 +1,5 @@