amis2/scss/components/_audio.scss

150 lines
3.3 KiB
SCSS
Raw Normal View History

2019-05-05 10:49:20 +08:00
@mixin input-range {
width: $Audio-input-width;
display: inline-block;
-webkit-appearance: none;
vertical-align: middle;
outline: none;
border: none;
padding: 0;
background: none;
&::-webkit-slider-runnable-track {
background-color: $Audio-track-bg;
height: $Audio-track-height;
border-radius: $Audio-track-borderRadius;
border: $Audio-track-border;
}
&::-webkit-slider-thumb {
-webkit-appearance: none !important;
border-radius: 100%;
cursor: pointer;
background: $Audio-thumb-bg;
height: $Audio-thumb-width;
width: $Audio-thumb-height;
margin-top: $Audio-thumb-marginTop;
}
}
@mixin svg {
width: $Audio-svg-width;
height: $Audio-svg-height;
position: relative;
top: $Audio-svg-top;
2019-05-05 10:49:20 +08:00
}
.#{$ns}Audio-original {
display: none;
}
2019-05-05 14:45:12 +08:00
.#{$ns}Audio--inline {
2019-05-06 14:08:33 +08:00
display: inline-block;
height: $Audio-height;
overflow: hidden;
2019-05-05 14:45:12 +08:00
}
2019-05-05 10:49:20 +08:00
.#{$ns}Audio {
box-sizing: border-box;
2019-05-05 10:49:20 +08:00
height: $Audio-height;
line-height: $Audio-lineHeight;
border: $Audio-border;
2019-05-05 14:45:12 +08:00
display: inline-block;
padding-left: $Audio-item-margin;
&-rates {
2019-05-06 14:08:33 +08:00
display: inline-block;
width: $Audio-rate-width;
height: $Audio-rate-height;
text-align: center;
background: $Audio-rate-bg;
cursor: pointer;
margin-right: $Audio-item-margin;
2019-05-06 14:08:33 +08:00
}
&-rateControl {
2019-05-05 10:49:20 +08:00
display: inline-block;
margin-right: $Audio-item-margin;
&::after {
display: inline-block;
clear: both;
content: "";
}
2019-05-05 10:49:20 +08:00
.#{$ns}Audio-rateControlItem {
display: inline-block;
2019-05-05 10:49:20 +08:00
width: $Audio-rate-width;
height: $Audio-rate-height;
background: $Audio-rate-bg;
cursor: pointer;
text-align: center;
float: left;
box-sizing: border-box;
border-right: $Audio-rateControlItem-borderRight;
2019-05-05 10:49:20 +08:00
}
}
2019-05-05 10:49:20 +08:00
&-play {
display: inline-block;
width: $Audio-play-width;
cursor: pointer;
margin-right: $Audio-item-margin;
2019-05-05 10:49:20 +08:00
svg {
@include svg();
}
}
2019-05-05 10:49:20 +08:00
&-times {
display: inline-block;
width: $Audio-times-width;
margin-right: $Audio-item-margin;
2019-05-05 10:49:20 +08:00
cursor: default;
}
2019-05-05 10:49:20 +08:00
&-process {
display: inline-block;
width: $Audio-process-width;
cursor: pointer;
margin-right: $Audio-item-margin;
2019-05-05 10:49:20 +08:00
input[type="range"] {
2019-05-05 10:49:20 +08:00
@include input-range();
}
}
2019-05-05 10:49:20 +08:00
&-volume {
display: inline-block;
width: $Audio-volume-width;
height: $Audio-volume-height;
cursor: pointer;
margin-right: $Audio-item-margin;
2019-05-05 10:49:20 +08:00
svg {
@include svg();
}
}
&-volumeControl {
display: inline-block;
width: $Audio-volumeControl-width;
height: $Audio-volumeControl-height;
line-height: $Audio-volumeControl-lineHeight;
margin-right: $Audio-item-margin;
input[type="range"] {
@include input-range();
}
2019-05-05 10:49:20 +08:00
.#{$ns}Audio-volumeControlIcon {
margin-right: $Audio-item-margin;
display: inline-block;
cursor: pointer;
}
2019-05-05 10:49:20 +08:00
svg {
@include svg();
2019-05-05 10:49:20 +08:00
}
}
}