vue-material/src/components/mdSelect/mdSelect.scss
2016-11-14 03:36:13 -02:00

161 lines
3 KiB
SCSS

@import '../../core/stylesheets/variables.scss';
.md-select {
width: 100%;
min-width: 128px;
height: 32px;
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;
}
}
}
select {
position: absolute;
left: -999em;
}
.md-menu {
width: 100%;
height: 100%;
display: block;
position: relative;
}
.md-select-value {
width: 100%;
height: 100%;
padding-right: 24px;
display: flex;
align-items: center;
cursor: pointer;
position: relative;
z-index: 2;
font-size: 16px;
line-height: 1.2em;
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-direction-bottom-left {
margin-top: -15px;
margin-left: 16px;
}
&.md-direction-top-right {
margin-top: 15px;
margin-left: -16px;
}
&.md-direction-top-left {
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;
}
}
}