diff --git a/src/platform/core/json-formatter/json-formatter.component.scss b/src/platform/core/json-formatter/json-formatter.component.scss
index 40760a7b80..9ae682200c 100644
--- a/src/platform/core/json-formatter/json-formatter.component.scss
+++ b/src/platform/core/json-formatter/json-formatter.component.scss
@@ -15,13 +15,25 @@
& .td-key,
& .td-object-children {
padding-left: 24px;
+ /deep/ [dir='rtl'] & {
+ padding-right: 24px;
+ padding-left: 0;
+ }
&.td-key-leaf {
padding-left: 48px;
+ /deep/ [dir='rtl'] & {
+ padding-right: 48px;
+ padding-left: 0;
+ }
}
}
}
.value {
margin-left: 5px;
+ /deep/ [dir='rtl'] & {
+ padding-right: 5px;
+ padding-left: 0;
+ }
.td-empty {
opacity: .5;
text-decoration: line-through;
diff --git a/src/platform/core/json-formatter/json-formatter.component.ts b/src/platform/core/json-formatter/json-formatter.component.ts
index 37cb99ff92..456b77c827 100644
--- a/src/platform/core/json-formatter/json-formatter.component.ts
+++ b/src/platform/core/json-formatter/json-formatter.component.ts
@@ -1,4 +1,5 @@
-import { Component, Input, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';
+import { Component, Input, ChangeDetectionStrategy, ChangeDetectorRef, Optional } from '@angular/core';
+import { Dir } from '@angular/material';
import { TdCollapseAnimation } from '../common/common.module';
@Component({
@@ -83,7 +84,15 @@ export class TdJsonFormatterComponent {
return this._children;
}
- constructor(private _changeDetectorRef: ChangeDetectorRef) {
+ get isRTL(): boolean {
+ if (this._dir) {
+ return this._dir.dir === 'rtl';
+ }
+ return false;
+ }
+
+ constructor(private _changeDetectorRef: ChangeDetectorRef,
+ @Optional() private _dir: Dir) {
}
/**
diff --git a/src/platform/core/layout/layout-manage-list/layout-manage-list.component.scss b/src/platform/core/layout/layout-manage-list/layout-manage-list.component.scss
index 949c1c7227..f74770e84e 100644
--- a/src/platform/core/layout/layout-manage-list/layout-manage-list.component.scss
+++ b/src/platform/core/layout/layout-manage-list/layout-manage-list.component.scss
@@ -1,3 +1,11 @@
+.td-menu-button {
+ margin-left: 0px;
+ /deep/ [dir='rtl'] & {
+ margin-right: 0px;
+ margin-left: 6px;
+ }
+}
+
:host {
display: flex;
margin: 0;
@@ -15,14 +23,6 @@
}
}
}
- .td-menu-button {
- [dir='ltr'] & {
- margin-left: 0px;
- }
- [dir='rtl'] & {
- margin-right: 0px;
- }
- }
.list {
text-align: start;
}
diff --git a/src/platform/core/layout/layout-nav-list/layout-nav-list.component.scss b/src/platform/core/layout/layout-nav-list/layout-nav-list.component.scss
index 2927ec1825..ec2b7a7549 100644
--- a/src/platform/core/layout/layout-nav-list/layout-nav-list.component.scss
+++ b/src/platform/core/layout/layout-nav-list/layout-nav-list.component.scss
@@ -1,3 +1,11 @@
+.td-menu-button {
+ margin-left: 0px;
+ /deep/ [dir='rtl'] & {
+ margin-right: 0px;
+ margin-left: 6px;
+ }
+}
+
:host {
display: flex;
margin: 0;
@@ -15,14 +23,6 @@
}
}
}
- .td-menu-button {
- [dir='ltr'] & {
- margin-left: 0px;
- }
- [dir='rtl'] & {
- margin-right: 0px;
- }
- }
.list {
text-align: start;
}
diff --git a/src/platform/core/layout/layout-nav/layout-nav.component.scss b/src/platform/core/layout/layout-nav/layout-nav.component.scss
index 9664e6c95e..05c007974b 100644
--- a/src/platform/core/layout/layout-nav/layout-nav.component.scss
+++ b/src/platform/core/layout/layout-nav/layout-nav.component.scss
@@ -1,3 +1,11 @@
+.td-menu-button {
+ margin-left: 0px;
+ /deep/ [dir='rtl'] & {
+ margin-right: 0px;
+ margin-left: 6px;
+ }
+}
+
:host {
display: flex;
margin: 0;
@@ -5,12 +13,4 @@
min-height: 100%;
height: 100%;
overflow: hidden;
- .td-menu-button {
- [dir='ltr'] & {
- margin-left: 0px;
- }
- [dir='rtl'] & {
- margin-right: 0px;
- }
- }
}
diff --git a/src/platform/core/menu/menu.component.scss b/src/platform/core/menu/menu.component.scss
index d7074c36f7..122baacd63 100644
--- a/src/platform/core/menu/menu.component.scss
+++ b/src/platform/core/menu/menu.component.scss
@@ -18,11 +18,10 @@ $td-menu-spacing: 8px !default;
height: auto;
padding: $td-menu-spacing;
.mat-list-text {
- [dir='ltr'] & {
- padding-right: 0px;
- }
+ padding-right: 0px;
[dir='rtl'] & {
padding-left: 0px;
+ padding-right: 16px;
}
}
[md-line] + [md-line] {
diff --git a/src/platform/core/notifications/notification-count.component.scss b/src/platform/core/notifications/notification-count.component.scss
index 2dbd95e371..c18186e19d 100644
--- a/src/platform/core/notifications/notification-count.component.scss
+++ b/src/platform/core/notifications/notification-count.component.scss
@@ -1,4 +1,3 @@
-@import '../common/styles/mixins';
$td-notification-size: 20px !default;
$td-notification-content-size: 40px !default;
@@ -40,21 +39,10 @@ $td-notification-content-size: 40px !default;
bottom: 0px;
}
&.td-notification-before {
-
- [dir='ltr'] & {
- left: 0px;
- }
- [dir='rtl'] & {
- right: 0px;
- }
+ left: 0px
}
&.td-notification-after {
- [dir='ltr'] & {
- right: 0px;
- }
- [dir='rtl'] & {
- left: 0px;
- }
+ right: 0px;
}
&.td-notification-no-count {
width: 8px;
@@ -66,39 +54,29 @@ $td-notification-content-size: 40px !default;
bottom: 8px;
}
&.td-notification-before {
- [dir='ltr'] & {
- left: 8px;
- }
- [dir='rtl'] & {
- right: 8px;
- }
+ left: 8px;
}
&.td-notification-after {
- [dir='ltr'] & {
- right: 8px;
- }
- [dir='rtl'] & {
- left: 8px;
- }
+ right: 8px;
}
}
/deep/ [dir='rtl'] & {
&.td-notification-before {
- @include rtl(right, 0px,auto);
- @include rtl(left, auto, 0px);
+ right: 0px;
+ left: auto;
}
&.td-notification-after {
- @include rtl(left, 0px,auto);
- @include rtl(right, auto, 0px);
+ left: 0px;
+ right: auto;
}
&.td-notification-no-count {
&.td-notification-before {
- @include rtl(right, 8px,auto);
- @include rtl(left, auto, 8px);
+ right: 8px;
+ left: auto;
}
&.td-notification-after {
- @include rtl(left, 8px,auto);
- @include rtl(right, auto, 8px);
+ left: 8px;
+ right: auto;
}
}
}
diff --git a/src/platform/core/paging/paging-bar.component.html b/src/platform/core/paging/paging-bar.component.html
index fbbdd790eb..879071c056 100644
--- a/src/platform/core/paging/paging-bar.component.html
+++ b/src/platform/core/paging/paging-bar.component.html
@@ -13,16 +13,16 @@
\ No newline at end of file
diff --git a/src/platform/core/paging/paging-bar.component.scss b/src/platform/core/paging/paging-bar.component.scss
index 1380a6d3be..de8bfba03b 100644
--- a/src/platform/core/paging/paging-bar.component.scss
+++ b/src/platform/core/paging/paging-bar.component.scss
@@ -25,13 +25,4 @@ md-select {
display: none;
}
}
-}
-.td-paging-size {
- margin-right: -5px;
- [dir='ltr'] & {
- margin-right: -5px;
- }
- [dir='rtl'] & {
- margin-left: -5px;
- }
}
\ No newline at end of file
diff --git a/src/platform/core/paging/paging-bar.component.ts b/src/platform/core/paging/paging-bar.component.ts
index 55ca19a5b1..66218344ff 100644
--- a/src/platform/core/paging/paging-bar.component.ts
+++ b/src/platform/core/paging/paging-bar.component.ts
@@ -1,4 +1,5 @@
-import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';
+import { Component, Input, Output, EventEmitter, OnInit, Optional } from '@angular/core';
+import { Dir } from '@angular/material';
export interface IPageChangeEvent {
page: number;
@@ -126,6 +127,15 @@ export class TdPagingBarComponent implements OnInit {
*/
@Output('change') onChange: EventEmitter = new EventEmitter();
+ get isRTL(): boolean {
+ if (this._dir) {
+ return this._dir.dir === 'rtl';
+ }
+ return false;
+ }
+
+ constructor(@Optional() private _dir: Dir) {}
+
ngOnInit(): void {
this._page = this.initialPage;
this._calculateRows();
diff --git a/src/platform/core/search/search-box/search-box.component.scss b/src/platform/core/search/search-box/search-box.component.scss
index 2b2ec421b1..6ea421b2f8 100644
--- a/src/platform/core/search/search-box/search-box.component.scss
+++ b/src/platform/core/search/search-box/search-box.component.scss
@@ -4,18 +4,15 @@
.td-search-box {
height: 64px;
td-search-input {
+ margin-left: 12px;
+ /deep/ [dir='rtl'] & {
+ margin-right: 12px;
+ margin-left: 0px !important;
+ }
/deep/ {
.mat-input-placeholder.mat-focused {
visibility: hidden;
}
}
-
- [dir='ltr'] & {
- margin-left: 12px;
- }
- [dir='rtl'] & {
- margin-right: 12px;
- }
-
}
}
\ No newline at end of file
diff --git a/src/platform/core/search/search-box/search-box.component.ts b/src/platform/core/search/search-box/search-box.component.ts
index 839fa10575..099fda29ec 100644
--- a/src/platform/core/search/search-box/search-box.component.ts
+++ b/src/platform/core/search/search-box/search-box.component.ts
@@ -12,10 +12,12 @@ import { TdSearchInputComponent } from '../search-input/search-input.component';
state('false', style({
width: '0%',
'margin-left': '0px',
+ 'margin-right': '0px',
})),
state('true', style({
width: '100%',
'margin-left': '*',
+ 'margin-right': '*',
})),
transition('0 => 1', animate('200ms ease-in')),
transition('1 => 0', animate('200ms ease-out')),
diff --git a/src/platform/core/search/search-input/search-input.component.html b/src/platform/core/search/search-input/search-input.component.html
index c6bfcb764c..5d97c7279b 100644
--- a/src/platform/core/search/search-input/search-input.component.html
+++ b/src/platform/core/search/search-input/search-input.component.html
@@ -11,7 +11,7 @@