Skip to content

Commit

Permalink
Merge pull request #52 from pmgarman/patch/main-menu-sass
Browse files Browse the repository at this point in the history
Use standard methods for main menu
  • Loading branch information
gregrickaby committed Jun 28, 2015
2 parents 35c9924 + efa5c36 commit fc482c0
Showing 1 changed file with 26 additions and 25 deletions.
51 changes: 26 additions & 25 deletions sass/modules/_navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,38 +22,38 @@ a {

.menu {
@include margin-padding-reset;

list-style: none;

li {
margin: 0 rem(10) 0 0;
}

ul {
@include margin-padding-reset;

list-style: none;
}

&.menu-horizontal {

li {
display: inline-block;
}
}

&.menu-vertical {

li {
margin: 0;
}

a {
padding: rem(10);
border-bottom: 1px solid $color-background-hr;
}
}

&.dropdown {

// Sub-menu
Expand All @@ -64,7 +64,7 @@ a {
position: absolute;
top: em(24px);
z-index: 99999;

// Sub-sub menu
ul {
left: -999em;
Expand All @@ -79,7 +79,7 @@ a {
left: 100%;
}
}

// Sub-menu links
a {
@include size(200px auto);
Expand All @@ -93,30 +93,30 @@ a {
a.focus {
}
}

// Display sub-menu on hover
li:hover > ul,
li.focus > ul {
left: auto;
}

// Menu items
li {
float: left;
position: relative;

&:hover > a,
&.focus > a {
}
}
}

// Menu hyperlinks
a {
display: block;
text-decoration: none;
}

// Current items
.current_page_item a,
.current-menu-item a {
Expand All @@ -134,23 +134,24 @@ a {
// Menu area
ul {
display: none;

@include wider-than(phone-landscape) {
display: block;
}
}

&.toggled ul {
display: block;
}
}

// Small menu
.menu-toggle,
.main-navigation.toggled ul {
.menu-toggle {
display: block;
}

@media screen and (min-width: 37.5em) {
.menu-toggle {
@include wider-than(phone-landscape) {
display: none;
}

.main-navigation ul {
display: block;
}
}

.comment-navigation,
Expand Down

0 comments on commit fc482c0

Please sign in to comment.