Skip to content

Commit

Permalink
Merge pull request #7931 from abdullahsalem/Fix-dropdown-menu-alignme…
Browse files Browse the repository at this point in the history
…nt-rtl

Fix dropdown menu's alignment and arrow in RTL mode #7930
  • Loading branch information
gakimball committed Jan 19, 2016
2 parents acebf41 + d121ec7 commit a3a6420
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion js/foundation.dropdownMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
this.isVert = this.$element.hasClass(this.options.verticalClass);
this.$tabs.find('ul.is-dropdown-submenu').addClass(this.options.verticalClass);

if(this.$element.hasClass(this.options.rightClass) || this.options.alignment === 'right'){
if(this.$element.hasClass(this.options.rightClass) || this.options.alignment === 'right' || Foundation.rtl()){
this.options.alignment = 'right';
subs.addClass('is-left-arrow opens-left');
}else{
Expand Down
6 changes: 3 additions & 3 deletions scss/components/_dropdown-menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ $dropdownmenu-border-width: nth($dropdownmenu-border, 1);
display: none;
position: absolute;
top: 0;
left: 100%;
#{$global-left}: 100%;
min-width: $dropdownmenu-min-width;
z-index: 1;
background: $dropdownmenu-background;
Expand All @@ -117,8 +117,8 @@ $dropdownmenu-border-width: nth($dropdownmenu-border, 1);

&.first-sub {
top: 100%;
left: 0;
right: auto;
#{$global-left}: 0;
#{$global-right}: auto;
}

// [TODO] Cut back specificity
Expand Down

0 comments on commit a3a6420

Please sign in to comment.