mirror of
https://github.com/Hopiu/vue-material.git
synced 2026-04-03 14:50:36 +00:00
96 lines
2 KiB
SCSS
96 lines
2 KiB
SCSS
@import '../../core/stylesheets/variables.scss';
|
|
|
|
$menu-base-width: 56px;
|
|
|
|
.md-menu {
|
|
display: inline-block;
|
|
}
|
|
|
|
.md-menu-content {
|
|
width: $menu-base-width * 3;
|
|
min-width: $menu-base-width * 1.5;
|
|
max-width: $menu-base-width * 7;
|
|
min-height: 64px;
|
|
max-height: 256px;
|
|
padding: 8px 0;
|
|
display: flex;
|
|
flex-flow: column;
|
|
justify-content: stretch;
|
|
align-content: stretch;
|
|
pointer-events: none;
|
|
overflow-x: hidden;
|
|
overflow-y: auto;
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
z-index: 120;
|
|
background-color: #fff;
|
|
border-radius: 2px;
|
|
box-shadow: $material-shadow-2dp;
|
|
opacity: 0;
|
|
transform: scale3D(.85, .85, 1);
|
|
transition: width $swift-ease-out-duration $swift-ease-out-timing-function,
|
|
opacity .2s $swift-ease-in-timing-function,
|
|
transform .15s .1s $swift-ease-in-timing-function;
|
|
color: rgba(#212121, .87);
|
|
|
|
&.md-active {
|
|
pointer-events: auto;
|
|
opacity: 1;
|
|
transform: scale3D(1, 1, 1);
|
|
transform-origin: center;
|
|
transition: width $swift-ease-out-duration $swift-ease-out-timing-function,
|
|
opacity .2s $swift-ease-out-timing-function,
|
|
transform .15s .1s $swift-ease-out-timing-function;
|
|
|
|
> * {
|
|
opacity: 1;
|
|
transition: $swift-ease-in;
|
|
}
|
|
}
|
|
|
|
&.md-size-1 {
|
|
width: $menu-base-width * 1.5;
|
|
}
|
|
|
|
@for $i from 2 through 7 {
|
|
&.md-size-#{$i} {
|
|
width: $menu-base-width * $i;
|
|
}
|
|
}
|
|
|
|
> * {
|
|
opacity: 0;
|
|
transition: $swift-ease-out;
|
|
transition-duration: .3s;
|
|
}
|
|
}
|
|
|
|
.md-menu-item {
|
|
height: 48px;
|
|
min-height: 48px;
|
|
padding: 0 16px;
|
|
display: flex;
|
|
flex-flow: column;
|
|
justify-content: center;
|
|
overflow: hidden;
|
|
cursor: pointer;
|
|
position: relative;
|
|
transform: translate3D(0, 0, 0);
|
|
transition: $swift-ease-out;
|
|
font-size: 16px;
|
|
line-height: 1.2em;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
|
|
&:hover {
|
|
background-color: rgba(#000, .12);
|
|
transition: $swift-ease-out;
|
|
}
|
|
|
|
.md-menu-item-content {
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
}
|