UNPKG

pxt-core

Version:

Microsoft MakeCode provides Blocks / JavaScript / Python tools and editors

256 lines (202 loc) • 4.89 kB
/**************************************************** * Container * ****************************************************/ .sound-effect-editor-widget { overflow-y: auto; } .sound-effect-editor { width: 100%; box-shadow: 0 0 3px ~"rgb(0 0 0 / 30%)"; overflow: hidden; border-radius: 0.25rem; background-color: var(--pxt-neutral-background1); color: var(--pxt-neutral-foreground1); display: flex; flex-direction: column; user-select: none; -webkit-user-select: none; .link-button { margin-left: 1.8rem; } .common-menu-dropdown-pane { width: 8rem !important; } } .sound-effect-editor-content { flex-grow: 1; position: relative; overflow: hidden; } .sound-controls { padding: 0.5rem 1.8rem; } .sound-effect-header { display: flex; flex-direction: row; position: relative; height: 3.5rem; position: relative; justify-content: center; align-items: center; background-color: #e30fc0; // Matches block color & > .common-button { position: absolute; right: 0; top: 0; border: none; } } .common-button.link-button.generate-similar { margin-bottom: 0.5rem; } /**************************************************** * Graphs * ****************************************************/ .sound-graph-header { display: flex; flex-direction: row; align-items: center; padding-left: 0.5rem; padding-right: 0.5rem; & > span { flex-grow: 1; } } .frequency-graph { padding-top: 0.5rem; border-bottom: 1px solid var(--pxt-neutral-stencil2); } .dropdown-and-label { display: flex; flex-direction: row; margin-right: 0.5rem; align-items: center; } .sound-graph-container { margin-top: 0.5rem; border: 1px solid var(--pxt-neutral-stencil2); } .sound-label { font-size: 14px; font-weight: 400; line-height: 2rem; margin-right: 0.5rem; user-select: none; } .sound-label.waveform-name { font-weight: 600; margin-left: 0.5rem; } .waveform-and-duration-controls { display: flex; flex-direction: row; align-items: center; .duration-controls { display: flex; flex-direction: row; flex-grow: 1; justify-content: right; input { width: 3.5rem; } } } /**************************************************** * Preview * ****************************************************/ .sound-preview { height: 8rem; padding: 0 2.5rem; background: var(--pxt-neutral-background2); display: flex; justify-content: center; align-items: center; svg { height: 100%; } } .common-button.sound-effect-play-button { width: 3rem; height: 3rem; overflow: hidden; padding: 0; border-radius: 2rem; background-color: var(--pxt-neutral-foreground2); color: var(--pxt-neutral-background2); position: absolute; right: 0; margin-top: -1.5rem; .fas.fa-play, .fas.fa-stop { margin: 0 0 0 0.25rem; color: var(--pxt-neutral-background2); } .fas.fa-stop { margin: 0; } } .common-button.sound-effect-play-button:focus::after { border-radius: 2rem; } .sound-preview-baseline { stroke: var(--pxt-neutral-alpha50); } .sound-preview-static-wave { stroke: var(--pxt-neutral-alpha50); } .sound-preview-animated-wave { stroke: var(--pxt-primary-background); } /**************************************************** * Gallery * ****************************************************/ .sound-gallery { position: absolute; height: 100%; top: -100%; width: 100%; transition: top 0.25s ease; background: var(--pxt-colors-purple-background); padding: 1rem; overflow-y: auto; } .sound-gallery.visible { top: 0px; } .sound-gallery-scroller { min-height: 100%; display: flex; flex-direction: column; } .sound-gallery-scroller > .common-button { margin-bottom: 0.5rem; padding: 0.6rem 1rem 0.6rem; } .sound-gallery-item-label { display: flex; flex-direction: row; align-items: center; .common-button.sound-effect-play-button { position: relative; margin-top: 0; z-index: 2; } .sound-effect-name { font-size: 22px; width: 8rem; overflow: hidden; text-overflow: ellipsis; text-align: left; height: 2rem; align-items: center; display: flex; } svg { width: 10rem; } .sound-gallery-preview { flex-grow: 1; } } .sound-gallery-preview-wave { stroke: var(--pxt-primary-background); }