mirror of
https://github.com/Hopiu/vue-material.git
synced 2026-05-13 01:33:13 +00:00
158 lines
2.9 KiB
SCSS
158 lines
2.9 KiB
SCSS
@import '../../core/stylesheets/variables.scss';
|
|
|
|
$select-height: 32px;
|
|
|
|
.md-select {
|
|
width: 100%;
|
|
min-width: 128px;
|
|
height: $select-height;
|
|
position: relative;
|
|
|
|
&:focus {
|
|
outline: none;
|
|
}
|
|
|
|
&:after {
|
|
margin-top: 2px;
|
|
position: absolute;
|
|
top: 50%;
|
|
right: 0;
|
|
transform: translateY(-50%) scaleY(0.45) scaleX(0.85);
|
|
transition: $swift-linear;
|
|
color: rgba(#000, .54);
|
|
content: "\25BC";
|
|
}
|
|
|
|
&.md-active {
|
|
.md-select-menu {
|
|
top: -8px;
|
|
pointer-events: auto;
|
|
opacity: 1;
|
|
transform: translateY(-8px) scale3D(1, 1, 1);
|
|
transform-origin: center top;
|
|
transition: $swift-ease-out;
|
|
transition-duration: .25s;
|
|
transition-property: opacity, transform, top;
|
|
|
|
> * {
|
|
opacity: 1;
|
|
transition: $swift-ease-in;
|
|
transition-duration: .15s;
|
|
transition-delay: .1s;
|
|
}
|
|
}
|
|
}
|
|
|
|
&.md-disabled {
|
|
pointer-events: none;
|
|
user-select: none;
|
|
user-drag: none;
|
|
|
|
&:after {
|
|
color: rgba(#000, .38);
|
|
}
|
|
}
|
|
|
|
select {
|
|
position: absolute;
|
|
left: -999em;
|
|
}
|
|
|
|
.md-menu {
|
|
width: 100%;
|
|
height: $select-height;
|
|
display: block;
|
|
position: relative;
|
|
}
|
|
|
|
.md-select-value {
|
|
width: 100%;
|
|
height: $select-height;
|
|
padding-right: 24px;
|
|
display: block;
|
|
cursor: pointer;
|
|
overflow: hidden;
|
|
position: relative;
|
|
z-index: 2;
|
|
font-size: 16px;
|
|
line-height: $select-height + 1px;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.md-select-menu {
|
|
min-width: 156px;
|
|
max-width: 100%;
|
|
min-height: 48px;
|
|
display: flex;
|
|
flex-flow: column;
|
|
justify-content: stretch;
|
|
align-content: stretch;
|
|
pointer-events: none;
|
|
position: absolute;
|
|
top: -16px;
|
|
left: -16px;
|
|
z-index: 7;
|
|
background-color: #fff;
|
|
border-radius: 2px;
|
|
box-shadow: $material-shadow-2dp;
|
|
opacity: 0;
|
|
transform: scale3D(.85, .7, 1);
|
|
transition: opacity .25s $swift-ease-in-timing-function,
|
|
top .25s $swift-ease-in-timing-function,
|
|
transform 0s .25s $swift-ease-in-timing-function;
|
|
color: rgba(#212121, .87);
|
|
|
|
> * {
|
|
opacity: 0;
|
|
transition: $swift-ease-out;
|
|
transition-duration: .25s;
|
|
}
|
|
}
|
|
|
|
.md-select-menu-container {
|
|
margin: 0;
|
|
padding: 8px 0;
|
|
display: flex;
|
|
flex-flow: column;
|
|
justify-content: stretch;
|
|
align-content: stretch;
|
|
overflow-x: hidden;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.md-subheader {
|
|
color: rgba(#757575, .87);
|
|
text-transform: uppercase;
|
|
|
|
&:first-child {
|
|
margin-top: -8px;
|
|
}
|
|
}
|
|
}
|
|
|
|
.md-select-content {
|
|
width: auto;
|
|
max-height: 256px;
|
|
|
|
&.md-direction-bottom-right {
|
|
margin-top: -15px;
|
|
margin-left: -16px;
|
|
}
|
|
|
|
.md-menu-item .md-list-item-holder {
|
|
overflow: visible;
|
|
justify-content: flex-start;
|
|
}
|
|
|
|
&.md-multiple {
|
|
.md-checkbox {
|
|
margin: 0;
|
|
}
|
|
|
|
.md-checkbox-label {
|
|
padding-left: 16px;
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
}
|