Skip to content

Commit

Permalink
Fix user switcher overflow
Browse files Browse the repository at this point in the history
Overflow scroll elements doesn't play well with overflowing children
with position anything but static:
twbs/bootstrap#24251

Fix by padding with spacer div since user switcher has a known
maximum height.
  • Loading branch information
gnucifer committed Mar 1, 2019
1 parent 5582f43 commit acb7cca
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions app/styles/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -213,3 +213,7 @@ html {
margin-top: 100px;
width: 300px;
}

.user-switcher-spacer {
height: map-get($spacers, 4) * 3;
}
10 changes: 6 additions & 4 deletions app/templates/admin/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ as |form|
</table>
</div>
</div>
{{#if (gt model.meta.pagination.pages 1)}}
<div class="row">
<div class="row">
{{#if (gt model.meta.pagination.pages 1)}}
<div class="col-12 d-flex justify-content-center">
{{bs4-paginator
navAreaLabelText="Orders pagination"
Expand All @@ -268,6 +268,8 @@ as |form|
}}
{{! TODO rename => onPageChange}}
</div>
</div>
{{/if}}
{{else}}
<div class="col-12 user-switcher-spacer"></div>
{{/if}}
</div>
{{outlet}}

0 comments on commit acb7cca

Please sign in to comment.