Skip to content

Commit

Permalink
fix button dropdown whitespace issue in safari
Browse files Browse the repository at this point in the history
  • Loading branch information
sesemaya committed Aug 9, 2015
1 parent 4f3fe84 commit faccff3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
9 changes: 5 additions & 4 deletions assets/sass/components/_dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@
}

.dropdown-toggle-btn {
margin-right: 1px;
margin-left: 1px;
padding-right: $grid-gutter;
padding-left: $grid-gutter;
position: relative;
Expand All @@ -99,18 +101,17 @@
color: $black-text;
}
~ .dropdown-menu {
min-width: 101%;
min-width: calc(100% + 2px);
min-width: 100%;
padding-top: ($btn-height + $margin-base + ($nav-height - $btn-height)) !important;
// position
top: ($margin-base * -1 + ($nav-height - $btn-height) / -2);
left: -1px;
left: 0;
transform: scale(1, 0);
&.dropdown-menu-right,
.dropdown.pull-right &,
.nav.pull-right & {
// position
right: -1px;
right: 0;
left: auto;
}
}
Expand Down
10 changes: 5 additions & 5 deletions css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -5923,6 +5923,8 @@ pre code {
}

.dropdown-toggle-btn {
margin-right: 1px;
margin-left: 1px;
padding-right: 16px;
padding-left: 16px;
position: relative;
Expand All @@ -5934,18 +5936,16 @@ pre code {
color: #212121;
}
.dropdown-toggle-btn ~ .dropdown-menu {
min-width: 101%;
min-width: -webkit-calc(100% + 2px);
min-width: calc(100% + 2px);
min-width: 100%;
padding-top: 56px !important;
top: -14px;
left: -1px;
left: 0;
-webkit-transform: scale(1, 0);
-ms-transform: scale(1, 0);
transform: scale(1, 0);
}
.dropdown-toggle-btn ~ .dropdown-menu.dropdown-menu-right, .dropdown.pull-right .dropdown-toggle-btn ~ .dropdown-menu, .nav.pull-right .dropdown-toggle-btn ~ .dropdown-menu {
right: -1px;
right: 0;
left: auto;
}

Expand Down
2 changes: 1 addition & 1 deletion css/base.min.css

Large diffs are not rendered by default.

0 comments on commit faccff3

Please sign in to comment.