From 9d39876c318e5dc391c3b2c0f2b882f07b34bf2d Mon Sep 17 00:00:00 2001 From: nzbin Date: Thu, 2 May 2024 23:10:18 +0800 Subject: [PATCH] fix(multiple): fix RTL --- projects/gui/fill/fill.scss | 2 +- projects/gui/gui-form.scss | 12 +++++++++++- projects/gui/input-number/input-number.scss | 2 +- projects/gui/select/select.scss | 7 ++++++- projects/gui/slider/slider.scss | 5 +++++ 5 files changed, 24 insertions(+), 4 deletions(-) diff --git a/projects/gui/fill/fill.scss b/projects/gui/fill/fill.scss index 9202a31..13323b3 100644 --- a/projects/gui/fill/fill.scss +++ b/projects/gui/fill/fill.scss @@ -29,7 +29,7 @@ opacity: .12; content: ''; - [dir="rtl"] & { + [dir='rtl'] & { border-radius: 0; border-top-right-radius: var(--mdc-filled-text-field-container-shape); border-bottom-right-radius: var(--mdc-filled-text-field-container-shape); diff --git a/projects/gui/gui-form.scss b/projects/gui/gui-form.scss index 3697b2a..f9a1090 100644 --- a/projects/gui/gui-form.scss +++ b/projects/gui/gui-form.scss @@ -26,6 +26,11 @@ align-items: center; padding-right: 8px; + [dir='rtl'] & { + padding-right: 0; + padding-left: 8px; + } + gui-field-label { flex: 1; overflow: hidden; @@ -83,7 +88,7 @@ padding: 0 8px; border-radius: var(--mdc-filled-text-field-container-shape); - [dir="rtl"] & { + [dir='rtl'] & { padding: 0 8px; } } @@ -114,6 +119,11 @@ height: 16px; background-color: var(--mat-expansion-header-text-color); content: ''; + + [dir='rtl'] & { + left: auto; + right: 0; + } } } diff --git a/projects/gui/input-number/input-number.scss b/projects/gui/input-number/input-number.scss index 3743fba..61cdf49 100644 --- a/projects/gui/input-number/input-number.scss +++ b/projects/gui/input-number/input-number.scss @@ -2,7 +2,7 @@ .mat-mdc-text-field-wrapper { padding-right: 0; - [dir="rtl"] & { + [dir='rtl'] & { padding-left: 0; } } diff --git a/projects/gui/select/select.scss b/projects/gui/select/select.scss index bd77f57..6c5651d 100644 --- a/projects/gui/select/select.scss +++ b/projects/gui/select/select.scss @@ -4,10 +4,15 @@ .mat-mdc-option { min-height: var(--mat-option-label-text-line-height); - padding: 0 8px; + padding: 0 8px !important; .mat-pseudo-checkbox-full { margin-right: 8px; + + [dir='rtl'] & { + margin-right: 0; + margin-left: 8px; + } } } diff --git a/projects/gui/slider/slider.scss b/projects/gui/slider/slider.scss index 0f8bca4..b5ee504 100644 --- a/projects/gui/slider/slider.scss +++ b/projects/gui/slider/slider.scss @@ -38,6 +38,11 @@ .mat-mdc-form-field { margin-left: 6px; + [dir='rtl'] & { + margin-left: 0; + margin-right: 6px; + } + input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { appearance: none;