waveform-playlist
Version:
Multiple track web audio editor and player with waveform preview
450 lines (378 loc) • 11.8 kB
Plain Text
$wp-mute-solo-color: #343a40 !default;
$wp-mute-solo-hover-color: #fff !default;
$wp-mute-solo-focus-color: rgba(52, 58, 64, 0.5) !default;
$wp-btn-danger-background-hover-color: #c82333 !default;
$wp-btn-danger-border-hover-color: #bd2130 !default;
$wp-btn-danger-background-color: #dc3545 !default;
$wp-btn-danger-border-color: #dc3545 !default;
$wp-btn-danger-focus-color: rgba(225, 83, 97, 0.5) !default;
$wp-btn-danger-color: #fff !default;
$wp-btn-info-background-hover-color: #138496 !default;
$wp-btn-info-border-hover-color: #117a8b !default;
$wp-btn-info-background-color: #17a2b8 !default;
$wp-btn-info-border-color: #17a2b8 !default;
$wp-btn-info-focus-color: rgba(58, 176, 195, 0.5) !default;
$wp-btn-info-color: #fff !default;
$wp-selection-background-color: rgba(0, 0, 0, 0.1) !default;
$wp-selection-point-color: red !default;
$wp-fade-background-color: rgba(0, 0, 0, 0.1) !default;
$wp-channel-color: grey !default;
$wp-channel-progress-color: #fbbc04 !default;
$wp-cursor-color: black !default;
$wp-tracks-container-background-color: #e0eff1 !default;
$wp-controls-background-color: #fff !default;
$wp-controls-border-color: #000 !default;
$wp-range-slider-label-color: black !default;
$wp-range-slider-color: goldenrod !default;
$wp-range-slider-focus-color: black !default;
$wp-range-slider-background-color: #ddd !default;
$wp-range-slider-background-focus-color: #bbb !default;
$wp-annotation-box-border-color: grey !default;
$wp-annotation-current-background-color: #ebf4f6 !default;
$wp-annotation-icon-hover-color: orange !default;
:root {
--wp-controls-border-color: #{$wp-controls-border-color};
--wp-controls-background-color: #{$wp-controls-background-color};
--wp-mute-solo-color: #{$wp-mute-solo-color};
--wp-mute-solo-hover-color: #{$wp-mute-solo-hover-color};
--wp-mute-solo-focus-color: #{$wp-mute-solo-focus-color};
--wp-btn-danger-background-hover-color: #{$wp-btn-danger-background-hover-color};
--wp-btn-danger-border-hover-color: #{$wp-btn-danger-border-hover-color};
--wp-btn-danger-background-color: #{$wp-btn-danger-background-color};
--wp-btn-danger-border-color: #{$wp-btn-danger-border-color};
--wp-btn-danger-focus-color: #{$wp-btn-danger-focus-color};
--wp-btn-danger-color: #{$wp-btn-danger-color};
--wp-btn-info-background-hover-color: #{$wp-btn-info-background-hover-color};
--wp-btn-info-border-hover-color: #{$wp-btn-info-border-hover-color};
--wp-btn-info-background-color: #{$wp-btn-info-background-color};
--wp-btn-info-border-color: #{$wp-btn-info-border-color};
--wp-btn-info-focus-color: #{$wp-btn-info-focus-color};
--wp-btn-info-color: #{$wp-btn-info-color};
--wp-fade-background-color: #{$wp-fade-background-color};
--wp-channel-color: #{$wp-channel-color};
--wp-channel-progress-color: #{$wp-channel-progress-color};
--wp-cursor-color: #{$wp-cursor-color};
--wp-selection-background-color: #{$wp-selection-background-color};
--wp-selection-point-color: #{$wp-selection-point-color};
--wp-tracks-container-background-color: #{$wp-tracks-container-background-color};
--wp-range-slider-label-color: #{$wp-range-slider-label-color};
--wp-range-slider-color: #{$wp-range-slider-color};
--wp-range-slider-focus-color: #{$wp-range-slider-focus-color};
--wp-range-slider-background-color: #{$wp-range-slider-background-color};
--wp-range-slider-background-focus-color: #{$wp-range-slider-background-focus-color};
--wp-annotation-box-border-color: #{$wp-annotation-box-border-color};
--wp-annotation-current-background-color: #{$wp-annotation-current-background-color};
--wp-annotation-icon-hover-color: #{$wp-annotation-icon-hover-color};
}
.playlist {
*, ::after, ::before {
box-sizing: border-box;
}
margin: 2em 0;
.btn:not(:disabled) {
cursor: pointer;
}
.btn {
display: inline-block;
font-weight: 400;
text-align: center;
vertical-align: middle;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background-color: transparent;
border: 1px solid transparent;
transition: color .15s ease-in-out,
background-color .15s ease-in-out,
border-color .15s ease-in-out,
box-shadow .15s ease-in-out;
}
.btn-outline-dark {
color: var(--wp-mute-solo-color);
border-color: var(--wp-mute-solo-color);
}
.btn-outline-dark:hover {
color: var(--wp-mute-solo-hover-color);
background-color: var(--wp-mute-solo-color);
border-color: var(--wp-mute-solo-color);
}
.btn-outline-dark:active:focus, .btn-outline-dark:focus {
box-shadow: 0 0 0 0.2rem var(--wp-mute-solo-focus-color);
}
.btn-danger {
color: var(--wp-btn-danger-color);
background-color: var(--wp-btn-danger-background-color);
border-color: var(--wp-btn-danger-border-color);
}
.btn-danger:hover {
color: var(--wp-btn-danger-color);
background-color: var(--wp-btn-danger-background-hover-color);
border-color: var(--wp-btn-danger-border-hover-color);
}
.btn-danger:active:focus, .btn-danger:focus {
box-shadow: 0 0 0 0.2rem var(--wp-btn-danger-focus-color);
}
.btn-info {
color: var(--wp-btn-info-color);
background-color: var(--wp-btn-info-background-color);
border-color: var(--wp-btn-info-border-color);
}
.btn-info:hover {
color: var(--wp-btn-info-color);
background-color: var(--wp-btn-info-background-hover-color);
border-color: var(--wp-btn-info-border-hover-color);
}
.btn-info:active:focus, .btn-info:focus {
box-shadow: 0 0 0 0.2rem var(--wp-btn-info-focus-color);
}
.btn-xs {
padding: .25rem .4rem;
font-size: .875rem;
line-height: .5;
border-radius: .2rem;
}
.btn-group {
margin-bottom: 0.3rem;
}
.btn-group > .btn:not(:first-child) {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.btn-group > .btn:not(:last-child) {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.playlist-time-scale {
height: 30px;
}
.playlist-tracks {
background: var(--wp-tracks-container-background-color);
}
.channel {
background: var(--wp-channel-color);
}
.channel-progress {
background: var(--wp-channel-progress-color);
}
.cursor {
background: var(--wp-cursor-color);
}
.wp-fade {
background-color: var(--wp-fade-background-color);
}
.state-cursor,
.state-select {
cursor: text;
}
.state-fadein {
cursor: w-resize;
}
.state-fadeout {
cursor: e-resize;
}
.state-shift {
cursor: ew-resize;
}
.selection.point {
background: var(--wp-selection-point-color);
}
.selection.segment {
background: var(--wp-selection-background-color);
}
.channel-wrapper.silent .channel {
opacity: 0.3;
}
.controls {
background: var(--wp-controls-background-color);
text-align: center;
border: 1px solid var(--wp-controls-border-color);
border-radius: 0.2rem;
.track-header {
overflow: hidden;
height: 26px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 0.2rem;
font-size: 0.75rem;
button {
width: 20px;
height: 20px;
display: flex;
align-items: center;
justify-content: center;
}
}
label {
width: 100%;
display: flex;
justify-content: space-between;
font: normal normal normal 14px/1 FontAwesome;
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
transform: translate(0, 0);
padding: 0 1rem;
margin-bottom: 0.2rem;
}
label:before {
color: var(--wp-range-slider-label-color);
font-size: 18px;
padding-right: 5px;
-moz-osx-font-smoothing: grayscale;
}
label:after {
color: var(--wp-range-slider-label-color);
font-size: 18px;
padding-left: 5px;
}
label.volume:before {
content: "\f027";
}
label.volume:after {
content: "\f028";
}
label.stereopan:before {
content: "L";
}
label.stereopan:after {
content: "R";
}
input[type="range"] {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
display: inline-block;
width: 75%;
}
input[type="range"]::-webkit-slider-runnable-track {
height: 5px;
background: var(--wp-range-slider-background-color);
border: none;
border-radius: 3px;
}
input[type="range"]::-moz-range-track {
height: 5px;
background: var(--wp-range-slider-background-color);
border: none;
border-radius: 3px;
}
input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
border: none;
height: 12px;
width: 12px;
border-radius: 50%;
background: var(--wp-range-slider-color);
margin-top: -5px;
cursor: ew-resize;
}
input[type="range"]::-moz-range-thumb {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
border: none;
height: 12px;
width: 12px;
border-radius: 50%;
background: var(--wp-range-slider-color);
margin-top: -5px;
cursor: ew-resize;
}
input[type="range"]:focus {
outline: none;
}
input[type="range"]:focus::-webkit-slider-runnable-track {
background: var(--wp-range-slider-background-focus-color);
}
input[type="range"]:focus::-moz-range-track {
background: var(--wp-range-slider-background-focus-color);
}
input[type="range"]:focus::-webkit-slider-thumb {
border: 2px solid var(--wp-range-slider-focus-color);
}
input[type="range"]:focus::-moz-range-thumb {
border: 2px solid var(--wp-range-slider-focus-color);
}
}
.annotations {
.annotations-boxes {
text-align: center;
}
.annotation-box {
border: 2px dashed var(--wp-annotation-box-border-color);
padding: 0 10px;
line-height: 1.5;
.resize-handle {
background: var(--wp-annotation-box-border-color);
opacity: 0.3;
cursor: ew-resize;
}
.id {
cursor: pointer;
display: inline-block;
width: 100%;
height: 100%;
}
}
.annotations-text {
font-size: 19px;
font-weight: 300;
margin-top: 1em;
height: 160px;
overflow-x: hidden;
overflow-y: auto;
.annotation {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: flex-start;
align-items: stretch;
span {
margin: 0.3rem 0.6rem;
&:last-of-type {
margin-right: 1.2rem;
}
}
.annotation-id {
font-size: 16px;
line-height: 27px;
}
.annotation-start {
font-size: 16px;
line-height: 27px;
}
.annotation-end {
font-size: 16px;
line-height: 27px;
}
.annotation-lines {
flex-grow: 10;
}
.annotation-actions {
flex-basis: auto;
width: 85px;
text-align: right;
font-size: 16px;
i {
margin-right: 0.6rem;
&:last-of-type {
margin-right: 0;
}
&:hover {
color: var(--wp-annotation-icon-hover-color);
cursor: pointer;
}
}
}
}
}
.current {
background-color: var(--wp-annotation-current-background-color);
}
}
}