Skip to content

Commit 1252eab

Browse files
committed
refactor(Carousel): improve RTL support of carousel control icons
1 parent cbfbc1f commit 1252eab

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

scss/_carousel.scss

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@use "functions/escape-svg" as *;
22
@use "mixins/clearfix" as *;
33
@use "mixins/color-mode" as *;
4+
@use "mixins/ltr-rtl" as *;
45
@use "mixins/transition" as *;
56
@use "variables" as *;
67

@@ -138,19 +139,11 @@
138139
background-size: 100% 100%;
139140
}
140141

141-
/* rtl:options: {
142-
"autoRename": true,
143-
"stringMap":[ {
144-
"name" : "prev-next",
145-
"search" : "prev",
146-
"replace" : "next"
147-
} ]
148-
} */
149142
.carousel-control-prev-icon {
150-
background-image: escape-svg($carousel-control-prev-icon-bg);
143+
@include ltr-rtl-value-only("background-image", escape-svg($carousel-control-prev-icon-bg), escape-svg($carousel-control-next-icon-bg));
151144
}
152145
.carousel-control-next-icon {
153-
background-image: escape-svg($carousel-control-next-icon-bg);
146+
@include ltr-rtl-value-only("background-image", escape-svg($carousel-control-next-icon-bg), escape-svg($carousel-control-prev-icon-bg));
154147
}
155148

156149
// Optional indicator pips/controls

0 commit comments

Comments
 (0)