10000 refactor: improve LTR and RTL direction handling · coreui/coreui@5745b12 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5745b12

Browse files
committed
refactor: improve LTR and RTL direction handling
1 parent e046621 commit 5745b12

18 files changed

+43
-37
lines changed

dist/css/coreui-grid.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/coreui-grid.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/coreui-grid.rtl.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/coreui-grid.rtl.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/coreui-utilities.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/coreui-utilities.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/coreui-utilities.rtl.css

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/coreui-utilities.rtl.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/coreui-utilities.rtl.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/coreui-utilities.rtl.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/coreui.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/coreui.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/coreui.rtl.css

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/coreui.rtl.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/coreui.rtl.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/coreui.rtl.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scss/_utilities.scss

Lines changed: 8 additions & 5 deletions
6D4E
Original file line numberDiff line numberDiff line change
@@ -109,21 +109,24 @@ $utilities: map-merge(
109109
"start": (
110110
property: left,
111111
class: start,
112-
values: $position-values
112+
values: $position-values,
113+
rtl: true
113114
),
114115
"end": (
115116
property: right,
116117
class: end,
117-
values: $position-values
118+
values: $position-values,
119+
rtl: true
118120
),
119121
"translate-middle": (
120122
property: transform,
121123
class: translate-middle,
122124
values: (
123-
null: translate(-50%, -50%),
124-
x: translateX(-50%),
125+
null: ("ltr": translate(-50%, -50%), "rtl": translate(50%, -50%)),
126+
x: ("ltr": translateX(-50%), "rtl": translateX(50%)),
125127
y: translateY(-50%),
126-
)
128+
),
129+
rtl: true
127130
),
128131
// scss-docs-end utils-position
129132
// scss-docs-start utils-borders

scss/mixins/_utilities.scss

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,14 @@
9393
}
9494
}
9595
@if $is-rtl == true {
96-
@include ltr-rtl($property, $value, null, null, if($enable-important-utilities, !important, null));
96+
@if (type-of($value) == 'map') {
97+
@include ltr-rtl($property, map-get($value, "ltr"), null, map-get($value, "rtl"), if($enable-important-utilities, !important, null));
98+
} @else {
99+
@include ltr-rtl($property, $value, null, null, if($enable-important-utilities, !important, null));
100+
}
97101
} @else {
98102
#{$property}: $value if($enable-important-utilities, !important, null);
99103
}
100-
101104
}
102105
}
103106
}

0 commit comments

Comments
 (0)
0