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

162 lines
3 KiB
SCSS
Raw Normal View History

@import '../../core/stylesheets/variables.scss';
2016-08-10 04:36:20 +00:00
.md-select {
width: 100%;
2016-08-10 04:36:20 +00:00
min-width: 128px;
height: 32px;
position: relative;
2016-08-10 04:36:20 +00:00
2016-08-11 22:54:58 +00:00
&:focus {
outline: none;
}
2016-08-10 04:36:20 +00:00
&:after {
margin-top: 2px;
2016-08-10 04:36:20 +00:00
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;
}
}
}
2016-08-10 04:36:20 +00:00
select {
position: absolute;
left: -999em;
}
2016-11-12 16:00:15 +00:00
.md-menu {
width: 100%;
height: 100%;
display: block;
position: relative;
}
.md-select-value {
width: 100%;
height: 100%;
2016-09-08 05:39:13 +00:00
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;
}
2016-08-10 04:36:20 +00:00
.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;
2016-08-16 02:34:05 +00:00
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;
}
2016-09-09 05:26:52 +00:00
.md-subheader {
color: rgba(#757575, .87);
text-transform: uppercase;
&:first-child {
margin-top: -8px;
}
}
}
2016-11-12 16:00:15 +00:00
.md-select-content {
2016-11-13 03:17:39 +00:00
width: auto;
2016-11-12 16:00:15 +00:00
max-height: 256px;
&.md-direction-bottom-right {
margin-top: -15px;
margin-left: -16px;
2016-08-10 04:36:20 +00:00
}
2016-08-16 00:02:16 +00:00
2016-11-12 16:00:15 +00:00
&.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;
2016-08-16 00:02:16 +00:00
}
2016-11-13 03:17:39 +00:00
.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;
2016-11-14 05:36:13 +00:00
cursor: pointer;
2016-11-13 03:17:39 +00:00
}
}
2016-08-16 00:02:16 +00:00
}