making menus more modular

This commit is contained in:
James Alley 2015-01-29 15:23:57 -08:00
parent 7f8115c520
commit bbe30bd039
3 changed files with 97 additions and 0 deletions

View File

@ -0,0 +1,19 @@
/* HORIZONTAL MENU */
.pure-menu-horizontal {
width: 100%;
white-space: nowrap;
}
.pure-menu-horizontal .pure-menu-list {
display: inline-block;
}
/* Initial menus should be inline-block so that they are horizontal */
.pure-menu-horizontal .pure-menu-item,
.pure-menu-horizontal .pure-menu-heading,
.pure-menu-horizontal .pure-menu-separator {
display: inline-block;
*display: inline;
zoom: 1;
vertical-align: middle;
}

View File

@ -0,0 +1,27 @@
/* scrollable menus */
.pure-menu-scrollable {
overflow-y: scroll;
overflow-x: hidden;
}
.pure-menu-scrollable .pure-menu-list {
display: block;
}
.pure-menu-horizontal.pure-menu-scrollable .pure-menu-list {
display: inline-block;
}
.pure-menu-horizontal.pure-menu-scrollable {
white-space: nowrap;
overflow-y: hidden;
overflow-x: auto;
-ms-overflow-style: none;
-webkit-overflow-scrolling: touch;
/* a little extra padding for this style to allow for scrollbars */
padding: .5em 0;
}
.pure-menu-horizontal.pure-menu-scrollable::-webkit-scrollbar {
display: none;
}

View File

@ -0,0 +1,51 @@
/* misc default styling */
.pure-menu-separator {
background-color: #ccc;
height: 1px;
margin: .3em 0;
}
.pure-menu-horizontal .pure-menu-separator {
width: 1px;
height: 1.3em;
margin: 0 .3em ;
}
.pure-menu-heading {
text-transform: uppercase;
color: #565d64;
}
.pure-menu-link {
color: #777;
}
.pure-menu-children {
background-color: #fff;
}
.pure-menu-link,
.pure-menu-disabled,
.pure-menu-heading {
padding: .5em 1em;
}
.pure-menu-disabled {
opacity: .5;
}
.pure-menu-disabled .pure-menu-link:hover {
background-color: transparent;
}
.pure-menu-active > .pure-menu-link,
.pure-menu-link:hover,
.pure-menu-link:focus {
background-color: #eee;
}
.pure-menu-selected .pure-menu-link,
.pure-menu-selected .pure-menu-link:visited {
color: #000;
}