Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(RTL mode): UI/UX improvement for Right-To-Left users #5552

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
2 changes: 1 addition & 1 deletion src/app/@theme/layouts/one-column/one-column.layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Component } from '@angular/core';
<ngx-header></ngx-header>
</nb-layout-header>

<nb-sidebar class="menu-sidebar" tag="menu-sidebar" responsive>
<nb-sidebar class="menu-sidebar" tag="menu-sidebar" responsive start>
<ng-content select="nb-menu"></ng-content>
</nb-sidebar>

Expand Down
3 changes: 3 additions & 0 deletions src/app/@theme/theme.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
NbSelectModule,
NbIconModule,
NbThemeModule,
NbLayoutDirection,
} from '@nebular/theme';
import { NbEvaIconsModule } from '@nebular/eva-icons';
import { NbSecurityModule } from '@nebular/security';
Expand Down Expand Up @@ -85,6 +86,8 @@ export class ThemeModule {
name: 'default',
},
[ DEFAULT_THEME, COSMIC_THEME, CORPORATE_THEME, DARK_THEME ],
null,
NbLayoutDirection.LTR,
).providers,
],
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@
top: 1rem;
@include nb-rtl(right, auto);
@include nb-rtl(left, 0.625rem);
@include nb-rtl(transform, scaleX(-1));
cursor: pointer;
}

::ng-deep .flipped {
.back-container {
.flip-icon {
transform: scaleX(-1);
@include nb-ltr(transform, scaleX(-1));
@include nb-rtl(transform, scaleX(1));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
flex: 1;

.title {
padding-left: 0.5rem;
@include nb-ltr(padding-left, 0.5rem);
@include nb-rtl(padding-right, 0.5rem);
}

nb-card-body {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
flex: 1;

.title {
padding-left: 0.5rem;
@include nb-ltr(padding-left, 0.5rem);
@include nb-rtl(padding-right, 0.5rem);
}

nb-card-header {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
top: 1rem;
@include nb-rtl(right, auto);
@include nb-rtl(left, 0.625rem);
@include nb-rtl(transform, scaleX(-1));
cursor: pointer;
}

::ng-deep .flipped {
.back-container {
.flip-icon {
transform: scaleX(-1);
@include nb-ltr(transform, scaleX(-1));
@include nb-rtl(transform, scaleX(1));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
top: 1.5rem;
@include nb-ltr(right, 1.5rem);
@include nb-rtl(left, 1.5rem);
@include nb-rtl(transform, scaleX(-1));
cursor: pointer;
background-color: transparent;
z-index: 2;
Expand Down
1 change: 1 addition & 0 deletions src/app/pages/tables/tree-grid/tree-grid.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

::ng-deep .row-toggle-button {
color: nb-theme(text-basic-color);
@include nb-rtl(transform, scaleX(-1));
}

.nb-tree-grid-header-cell,
Expand Down