amis2/scss/components/_audio.scss

147 lines
3.0 KiB
SCSS
Raw Normal View History

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