Skip to content

Commit f0b44d3

Browse files
committed
fix: RTL dropdown menu position
1 parent e7aada8 commit f0b44d3

File tree

1 file changed

+23
-27
lines changed

1 file changed

+23
-27
lines changed

scss/_dropdown.scss

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,7 @@
1717
.dropdown-menu {
1818
position: absolute;
1919
top: 100%;
20-
@include ltr {
21-
left: 0;
22-
}
23-
@include rtl {
24-
right: 0;
25-
}
20+
// left: 0;
2621
z-index: $zindex-dropdown;
2722
display: none; // none by default, but block on "open" of the menu
2823
float: left;
@@ -48,29 +43,30 @@
4843
@each $breakpoint in map-keys($grid-breakpoints) {
4944
@include media-breakpoint-up($breakpoint) {
5045
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
51-
.c-header .dropdown-menu,
52-
.navbar .dropdown-menu,
53-
.dropdown-menu[data-display^="static"] {
54-
&.dropdown-menu#{$infix}-left {
55-
@include ltr {
56-
right: auto;
57-
left: 0;
58-
}
59-
@include rtl {
60-
right: 0;
61-
left: auto;
62-
}
46+
47+
.c-header .dropdown-menu#{$infix}-left,
48+
.navbar .dropdown-menu#{$infix}-left,
49+
[data-display^="static"] ~ .dropdown-menu#{$infix}-left, {
50+
@include ltr {
51+
right: auto;
52+
left: 0;
6353
}
54+
@include rtl {
55+
right: 0;
56+
left: auto;
57+
}
58+
}
6459

65-
&.dropdown-menu#{$infix}-right {
66-
@include ltr {
67-
right: 0;
68-
left: auto;
69-
}
70-
@include rtl {
71-
right: auto;
72-
left: 0;
73-
}
60+
.c-header .dropdown-menu#{$infix}-right,
61+
.navbar .dropdown-menu#{$infix}-right,
62+
[data-display^="static"] ~ .dropdown-menu#{$infix}-right {
63+
@include ltr {
64+
right: 0;
65+
left: auto;
66+
}
67+
@include rtl {
68+
right: auto;
69+
left: 0;
7470
}
7571
}
7672
}

0 commit comments

Comments
 (0)