vue-material/src/components/mdMenu/mdMenu.scss

97 lines
2.1 KiB
SCSS
Raw Normal View History

2016-10-19 04:25:00 +00:00
@import '../../core/stylesheets/variables.scss';
$menu-base-width: 56px;
2016-10-19 04:25:00 +00:00
2016-10-20 04:40:20 +00:00
.md-menu {
display: inline-block;
}
.md-menu-content {
2016-10-20 04:40:20 +00:00
width: $menu-base-width * 3;
min-width: $menu-base-width * 1.5;
2016-10-20 04:40:20 +00:00
max-width: $menu-base-width * 7;
min-height: 64px;
2016-10-25 07:09:44 +00:00
max-height: calc(100vh - 32px);
overflow-x: hidden;
overflow-y: auto;
2016-10-25 07:09:44 +00:00
position: fixed;
z-index: 120;
background-color: #fff;
border-radius: 2px;
2016-11-16 19:56:26 +00:00
filter: drop-shadow(0 1px 1px rgba(#000, $shadow-key-umbra-opacity))
drop-shadow(0 2px 2px rgba(#000, $shadow-key-penumbra-opacity))
drop-shadow(0 1px 1px rgba(#000, $shadow-ambient-shadow-opacity));
opacity: 0;
2016-10-20 04:40:20 +00:00
transition: width $swift-ease-out-duration $swift-ease-out-timing-function,
2016-10-24 23:26:07 +00:00
opacity .25s $swift-ease-in-timing-function,
2016-11-12 16:00:15 +00:00
clip-path .17s .08s $swift-ease-in-timing-function;
color: rgba(#212121, .87);
2016-10-25 07:09:44 +00:00
&.md-direction-bottom-right {
margin-top: -11px;
margin-left: -8px;
clip-path: inset(-8px 10% 16% -8px);
}
2016-10-25 07:09:44 +00:00
&.md-direction-bottom-left {
margin-top: -11px;
margin-left: 8px;
clip-path: inset(-8px -8px 16% 10%);
}
&.md-direction-top-right {
margin-top: 11px;
margin-left: -8px;
clip-path: inset(-8px 16% -8px 10%);
}
&.md-direction-top-left {
margin-top: 11px;
margin-left: 8px;
clip-path: inset(16% -8px -8px 10%);
}
&.md-size-1 {
2016-10-20 04:40:20 +00:00
width: $menu-base-width * 1.5;
}
@for $i from 2 through 7 {
&.md-size-#{$i} {
2016-10-20 04:40:20 +00:00
width: $menu-base-width * $i;
}
}
2016-10-25 07:09:44 +00:00
&.md-active {
pointer-events: auto;
opacity: 1;
clip-path: inset(-8px -8px -8px -8px);
transition: width $swift-ease-out-duration $swift-ease-out-timing-function,
2016-11-12 16:00:15 +00:00
opacity .4s $swift-ease-out-timing-function,
clip-path .27s .08s $swift-ease-out-timing-function;
}
}
.md-menu-item {
cursor: pointer;
font-size: 16px;
line-height: 1.2em;
2016-10-25 00:04:00 +00:00
&:hover,
&:focus,
&.md-highlighted {
2016-10-25 07:09:44 +00:00
.md-button:not([disabled]) {
background-color: rgba(#000, .12);
}
}
&[disabled] {
cursor: default;
color: rgba(#000, .38);
}
2016-10-25 07:09:44 +00:00
.md-list-item-holder {
overflow: hidden;
text-overflow: ellipsis;
}
2016-10-19 04:25:00 +00:00
}