Skip to content

Commit

Permalink
Fix admin menu spacing
Browse files Browse the repository at this point in the history
admin menu spans all width and centers items since we removed horizontalNav.js from the backend we need a way to replicate the previous behavior display: table; on the parent <ul> and using display: table-cell; on chil <li> ensures we always use the whole width of the parent container and we span the children <li> accordingly using the same width across the given space

Fixes spree#3839

Conflicts:
	backend/app/views/spree/layouts/admin.html.erb
  • Loading branch information
mrpollo authored and radar committed Oct 8, 2013
1 parent 332f6dc commit 42ba3e6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions backend/app/assets/stylesheets/admin/components/_navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,18 @@ nav.menu {
#admin-menu {
background-color: $color-3;

ul{
display: table;
table-layout: fixed;
width: 100%;
}

li {
min-width: 90px;
display: table-cell;

a {
display: block;
padding: 25px 20px;
padding: 25px 15px;
color: $color-1 !important;
text-transform: uppercase;
position: relative;
Expand Down
2 changes: 1 addition & 1 deletion backend/app/views/spree/admin/shared/_menu.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<nav id="admin-menu" data-hook>
<div class="container">
<div class="sixteen columns main-menu-wrapper">
<ul data-hook="admin_tabs" class="inline-menu fullwidth-menu">
<ul data-hook="admin_tabs" class="fullwidth-menu">
<%= render :partial => 'spree/admin/shared/tabs' %>
</ul>
</div>
Expand Down

0 comments on commit 42ba3e6

Please sign in to comment.