Files
Iris/src/scss/components/_context-menu.scss
James Barnsley a4f5f25636 Context touch
2016-12-14 16:41:05 +13:00

115 lines
1.8 KiB
SCSS
Executable File

.context-menu {
position: fixed;
left: 0;
top: 0;
z-index: 99;
background: $dark_grey;
color: #FFFFFF;
.menu-item-wrapper {
display: block;
position: relative;
&:hover {
.menu-item {
background: lighten($dark_grey, 5%);
}
.submenu {
display: block;
}
}
.menu-item {
cursor: pointer;
display: block;
padding: 8px 12px;
width: 120px;
box-sizing: border-box;
}
&:not(:first-child) .menu-item {
border-top: 1px solid lighten($dark_grey, 8%);
}
.icon {
display: none;
}
.submenu-icon {
font-size: 10px;
float: right;
padding-top: 4px;
}
.submenu {
display: none;
position: absolute;
left: 120px;
top: 0;
max-height: 200px;
overflow-y: scroll;
background: lighten($dark_grey, 5%);
.menu-item {
width: 150px;
&:hover {
background: lighten($dark_grey, 10%);
}
}
}
}
&.touch{
bottom: 0 !important;
left: 0 !important;
right: 0 !important;
top: auto !important;
background: $blue;
.menu-item-wrapper {
display: inline-block;
.menu-item {
display: inline-block;
text-align: center;
width: 60px;
height: 60px;
border: 0 !important;
vertical-align: top;
&:hover {
background: inherit;
}
&:active,
&:focus {
background: rgba(255,255,255,0.2);
}
.icon {
padding: 5px;
display: inline-block;
}
.label {
display: block;
font-size: 10px;
}
.submenu-icon {
display: none !important;
}
}
.submenu {
display: none !important;
}
&:not(:first-child) .menu-item {
border-left: 1px solid rgba(255,255,255,0.2) !important;
}
}
}
}