Skip to content

Commit 47056ce

Browse files
committed
Apply #286 (add rtl support) to version 5.0.0
1 parent 6aad9dc commit 47056ce

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

src/css/wizard-navigation-bar.scss

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ $wz-param-indicator-state: null !global;
1616
// base color for one of possible wizard step states (default, current, done etc.).
1717
$wz-param-indicator-color: null !global;
1818

19+
@mixin rtl {
20+
@at-root [dir="rtl"] #{&} {
21+
@content;
22+
}
23+
}
1924

2025
@mixin wz-horizontal-line($dot-width, $dot-height, $line-color) {
2126
background-color: $line-color;
@@ -25,6 +30,11 @@ $wz-param-indicator-color: null !global;
2530
width: calc(100% - #{$dot-width});
2631
top: -($dot-height / 2);
2732
left: calc(50% + #{$dot-width / 2});
33+
34+
@include rtl {
35+
left: auto;
36+
right: calc(50% + #{$dot-width / 2});
37+
}
2838
}
2939

3040
@mixin wz-vertical-line($dot-width, $dot-height, $line-color) {
@@ -35,16 +45,31 @@ $wz-param-indicator-color: null !global;
3545
top: $dot-height;
3646
height: calc(100% - #{$dot-height});
3747
width: 1px;
48+
49+
@include rtl {
50+
left: auto;
51+
right: -($dot-height / 2);
52+
}
3853
}
3954

4055
@mixin wz-circle-position-horizontal($dot-width, $dot-height, $dot-border-width) {
4156
top: -$dot-height;
4257
left: calc(50% - #{$dot-width / 2});
58+
59+
@include rtl {
60+
left: auto;
61+
right: calc(50% - #{$dot-width / 2});;
62+
}
4363
}
4464

4565
@mixin wz-circle-position-vertical($dot-width, $dot-height, $dot-border-width) {
4666
top: 0;
4767
left: -$dot-width;
68+
69+
@include rtl {
70+
left: auto;
71+
right: -$dot-width;
72+
}
4873
}
4974

5075
@mixin wz-state-circle($dot-width, $dot-height, $dot-border-width) {
@@ -113,6 +138,10 @@ $wz-param-indicator-color: null !global;
113138
}
114139
@else if ($layout == 'vertical') {
115140
padding: ($wz-distance-between-steps / 2) ($wz-distance-between-steps / 2) ($wz-distance-between-steps / 2) ($wz-distance-between-steps / 2 + $height);
141+
142+
@include rtl {
143+
padding: ($wz-distance-between-steps / 2) ($wz-distance-between-steps / 2 + $height) ($wz-distance-between-steps / 2) ($wz-distance-between-steps / 2);
144+
}
116145
}
117146

118147
li {
@@ -400,6 +429,12 @@ aw-wizard-navigation-bar.vertical {
400429
.label {
401430
margin-left: $wz-text-margin-left;
402431
text-align: left;
432+
433+
@include rtl {
434+
margin-left: 0;
435+
margin-right: $wz-text-margin-left;
436+
text-align: right;
437+
}
403438
}
404439
}
405440
}

0 commit comments

Comments
 (0)