From 72734da6e57f4cc78b726d475864a9f404f277be Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Mon, 22 Feb 2016 08:13:02 +0100 Subject: [PATCH] UI optimization - fader, knob, xy and rgb use 3d accelerated css properties - reduce the number of composited layers to the strict necessary (tweakin properties such as z-index helps a lot) --- app/browser/css/style.css | 2 +- app/browser/js/app/utils.js | 4 ++- app/browser/js/app/widgets.js | 43 ++++++++++++++++-------- app/browser/scss/style.scss | 61 ++++++++++++++++++++++------------- 4 files changed, 72 insertions(+), 38 deletions(-) diff --git a/app/browser/css/style.css b/app/browser/css/style.css index b19e9212..7ef5574a 100644 --- a/app/browser/css/style.css +++ b/app/browser/css/style.css @@ -1 +1 @@ -* { margin: 0; padding: 0; box-sizing: border-box; text-decoration: none; outline: 0; font: inherit; cursor: inherit; -webkit-tap-highlight-color: transparent; }a { cursor: pointer; display: block; }::-webkit-scrollbar { width: 20rem; height: 20rem; opacity: 1; }::-webkit-scrollbar-track-piece { background: #22252c; }::-webkit-scrollbar-track-piece:vertical { border-left: 1rem solid #17191e; }::-webkit-scrollbar-track-piece:horizontal { border-top: 1rem solid #17191e; }::-webkit-scrollbar-corner { background: transparent; }::-webkit-scrollbar-thumb { background: #2d313a; }::-webkit-scrollbar-thumb:vertical { border-left: 1rem solid #17191e; }::-webkit-scrollbar-thumb:horizontal { border-top: 1rem solid #17191e; }* { -webkit-user-select: none; }input:focus::selection { background: #528bff; color: #eee; }input { cursor: text; }html, body { height: 100%; overflow: hidden; position: relative; }html { font-size: 1px; }body { font-size: 14rem; line-height: 16rem; font-family: sans; color: #eee; white-space: nowrap; opacity: 1; cursor: default; }.btn { background: #2d313a; display: block; box-shadow: 0 0 0 1rem #17191e; padding: 15rem; position: relative; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }.btn.small { padding: 5rem; padding-right: 15rem; }.btn.disabled { pointer-events: none; color: #aaa; }.btn.align-center { text-align: center; }#lobby { background: #22252c; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 2; border: 1rem solid #17191e; display: flex; align-items: center; justify-content: center; overflow-y: auto; padding: 20rem; }#lobby .main { width: 600rem; max-height: 100%; }#lobby .header { background: #2d313a; padding: 20rem; font-weight: bold; box-shadow: 0 0 0 1rem #17191e inset; white-space: nowrap; text-overflow: ellipsis; }#lobby a { padding-right: 35rem; overflow: hidden; margin-top: 10rem; position: relative; white-space: nowrap; text-overflow: ellipsis; }#lobby a span { position: absolute; right: 0rem; top: 0rem; padding: 15rem; color: #aaa; }#container { background: #22252c; position: absolute; top: 0; left: 0; right: 0; bottom: 0; overflow: hidden; transition: right .2s; }#container.sidepanel-open { right: 300rem; }#container #open-toggle { position: absolute; right: 0; top: 2rem; width: 60rem; height: 60rem; padding: 0 10rem; line-height: 60rem; font-size: 24rem; text-align: center; color: #aaa; z-index: 2; }#container #open-toggle.sidepanel-open { color: #eee; }#sidepanel { position: absolute; z-index: 999999; width: 300rem; top: 0; right: 0; bottom: 0; margin-right: -300rem; background: #22252c; border-left: 1rem solid #17191e; transition: right .2s; overflow-y: auto; overflow-x: visible; }#sidepanel.sidepanel-open { right: 300rem; }#sidepanel #options { position: absolute; left: 0; top: 2rem; right: 0; bottom: 0; padding: 5rem; list-style: none; }#sidepanel #options li { display: block; margin-bottom: 5rem; position: relative; background: #282c34; }#sidepanel #options li:last-child { margin-bottom: 0; }#sidepanel #options li .title { padding-bottom: 15rem; }#sidepanel #options li .actions { display: flex; align-items: stretch; }#sidepanel #options li .actions a { padding: 10rem; display: block; width: 100%; text-align: center; }#sidepanel #options li .actions a.on { pointer-events: none; }#sidepanel #options li .actions a.on:after { content: ""; position: absolute; top: 0; left: 0; right: 0; border-top: 2rem solid #528bff; }#sidepanel #options li .btn + span { position: absolute; right: 0rem; top: 0rem; padding: 5rem; color: #aaa; }#sidepanel #options li > div { box-shadow: 0 0 0 1rem #17191e; padding: 15rem; }#sidepanel #options .editor .form { margin-top: 10rem; }.editing { z-index: 99999999 !important; }.widget.editing:after, a.editing:before { content: ""; z-index: 999; position: absolute; top: 1rem; left: 0; right: 0; bottom: 0; border: 1px dashed #528bff; pointer-events: none; }a { color: inherit; }.navigation { position: absolute; top: 0; left: 0; right: 0; font-size: 14rem; background: #22252c; height: 60rem; }.navigation ::first-letter { text-transform: uppercase; }.navigation:before { content: ""; position: absolute; top: 1px; left: 0; width: 100%; height: 1px; background: #282c34; z-index: 3; }.navigation:after { content: ""; position: absolute; bottom: -1px; left: 0; width: 100%; height: 1px; background: #17191e; z-index: 3; }.navigation.main { padding-right: 55rem; right: 0; }.navigation ul { list-style: none; display: flex; padding: 7rem 6rem; }.navigation ul li.on + li { border-image: none; border-left: 1rem solid transparent; }.navigation ul li { display: block; max-width: 250rem; flex: 1; border-width: 0 0 0 1rem; border-image: linear-gradient(rgba(23, 25, 30, 0), #17191e, rgba(23, 25, 30, 0)) 0 0 0 1 stretch; }.navigation ul li:first-child, .navigation ul li.on { border-image: none; border-left: 1rem solid transparent; }.navigation ul li:first-child { border-left: 0; }.navigation ul li a { display: block; padding: 5rem 10rem; line-height: 34rem; border-radius: 3rem; overflow: hidden; text-align: center; border: 1rem solid transparent; position: relative; color: #aaa; }.navigation ul li a span { display: block; width: 100%; -webkit-mask: linear-gradient(to left, transparent, #000000 10rem) no-repeat; }.navigation ul li a.on { background: #2d313a; border: 1rem solid #17191e; color: #eee; }.navigation ul li a.on:before { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; box-shadow: inset 0 1rem 1rem rgba(255, 255, 255, 0.06); background: linear-gradient(rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)); }.navigation ul li a.on:after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4rem; }.content { position: absolute; left: 0; top: 60rem; right: 0; bottom: 0; background: #282c34; z-index: 1; }.content .content { top: 60rem; }#loading { position: absolute; top: 50%; left: 50%; margin-top: -15rem; text-align: center; }#loading .spinner { display: block; margin: 0 auto; height: 30rem; width: 30rem; border-radius: 50%; border: 2rem solid #17191e; border-top-color: #528bff; animation: spin .5s linear infinite; }#loading #status { margin-top: 10rem; display: inline-block; }@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }.popup { position: fixed; top: 0; left: 0; right: 0; bottom: 0; padding: 10%; background: rgba(238, 238, 238, 0.5); z-index: 1000000; }.popup .popup-title { position: relative; padding: 15rem; background: #2d313a; }.popup .popup-title .closer { position: absolute; right: 0rem; top: 0; padding: 15rem; color: #aaa; cursor: pointer; }.popup .popup-wrapper { background: #282c34; height: 100%; width: 100%; max-width: 600rem; margin: 0 auto; position: relative; overflow: hidden; border: 1rem solid #17191e; }.popup .popup-wrapper .popup-content { height: 100%; width: 100%; padding: 10rem; overflow-y: scroll; white-space: normal; }.form label { display: block; line-height: 15rem; font-size: 10rem; }.form .info { color: #aaa; margin-bottom: 10rem; }.form input, .form .input { display: block; background: #2d313a; font: inherit; color: #eee; border: 1rem solid #17191e; width: 100%; padding: 10rem; margin-bottom: 10rem; }.form input.invalid, .form .input.invalid { box-shadow: 0 0 0 1rem rgba(255, 0, 0, 0.3) !important; }.form input:focus, .form .input:focus { border-color: #528bff; }.form input .btn, .form .input .btn { background: #363b45; box-shadow: 0 0 0 1rem #22252c; }.form .checkbox { background: #2d313a; cursor: pointer; }.form .select-wrapper { position: relative; }.form .select-wrapper:after { content: "\f107"; font-family: FontAwesome; position: absolute; padding: 10rem; right: 0; top: 0; font-size: 20rem; }.form select { -webkit-appearance: none; }.form .submit { margin-top: 30rem; }.form .separator { line-height: 30rem; height: 30rem; margin-bottom: 5rem; position: relative; display: flex; align-items: center; }.form .separator:before, .form .separator:after { content: ""; top: 14rem; width: 100%; height: 1rem; background: #aaa; }.form .separator span { font-variant: small-caps; position: relative; display: block; width: 100%; text-align: center; }.tab.on.stretch { display: flex; justify-content: space-between; }.tab.on.stretch > .widget { width: 100%; }.tab { display: none; overflow: auto; position: relative; padding-top: 7rem; padding-left: 6rem; }.tab.on { display: block; height: 100%; width: auto; }.widget { display: inline-block; height: auto; min-width: 100rem; overflow: hidden; position: relative; font-size: 13rem; padding: 35rem 0 0; vertical-align: top; box-shadow: 0 0 0 1rem #22252c inset; background: #2d313a; background-clip: padding-box; -webkit-tap-highlight-color: transparent; border-right: 6rem solid transparent; border-bottom: 6rem solid transparent; }.widget:before { position: absolute; top: 1rem; left: 0; right: 0; height: 4rem; box-shadow: inset 0 1rem 1rem rgba(255, 255, 255, 0.06); z-index: 3; pointer-events: none; }.widget.absolute-position { position: absolute; z-index: 10; border: 0 !important; }.widget.nolabel { padding-top: 0; }.widget.nolabel > .label { display: none; }.widget .label { z-index: 1; padding: 10rem 10rem; position: absolute; top: 0; left: 0; right: 0; text-overflow: ellipsis; overflow: hidden; height: 35rem; }.widget .label.accent { color: #528bff; }.widget input { width: 100%; height: 30rem; border: 0; background: transparent; color: #aaa; display: block; padding: 10rem; }.widget input:focus { color: #528bff; }.widget input[disabled] { color: #aaa; }.ui-resizable-handle { position: absolute; border: 2rem solid transparent; z-index: 100000; }.ui-resizable-handle.ui-resizable-se { bottom: 5rem; right: 5rem; width: 15rem; height: 15rem; border-right: 2rem solid #528bff; border-bottom: 2rem solid #528bff; cursor: se-resize; }.ui-resizable-handle.ui-resizable-e { top: 50%; margin-top: -7.5rem; right: 5rem; width: 15rem; height: 15rem; border-right: 2rem solid #528bff; cursor: e-resize; }.ui-resizable-handle.ui-resizable-s { bottom: 5rem; left: 50%; margin-left: -7.5rem; width: 15rem; height: 15rem; border-bottom: 2rem solid #528bff; cursor: s-resize; }.ui-helper { border: 1rem dashed #528bff; background: rgba(82, 139, 255, 0.25); min-width: 30rem !important; min-height: 30rem !important; z-index: 99999999999 !important; }.ui-draggable-handle { position: absolute; position: absolute; top: 5rem; left: 5rem; z-index: 100000; cursor: -webkit-grab; width: 15rem; height: 15rem; border: 2rem solid #528bff; }.ui-draggable-handle:active { cursor: -webkit-grabbing; }/* STRIP (contains any widgets) */.strip-container { padding-top: 35rem; width: 100rem; height: 100%; overflow: visible; background: none; box-shadow: none; }.strip-container > .label { background: #2d313a; box-shadow: 0 0 0 1rem #22252c inset; }.strip-container.nolabel { padding: 0 !important; }.strip-container .strip { height: 100%; display: flex; flex-direction: column; }.strip-container .strip > .widget { display: block; width: auto; }.strip-container.vertical { padding-top: 35rem; }.strip-container.vertical .strip > .widget { border: 0 !important; min-width: auto !important; max-width: 100%; margin-top: -1rem; }.strip-container.horizontal { padding-top: 0; padding-left: 35rem; width: 100%; height: 130rem; min-height: 100rem; display: block; }.strip-container.horizontal .strip { flex-direction: row; }.strip-container.horizontal .strip > .widget { flex-shrink: initial; width: 100%; min-height: 100%; max-height: 100%; border-right: 0 !important; border-bottom: 0 !important; margin-left: -1rem; }.strip-container.horizontal > .label { width: 35rem; height: 100%; left: 0; top: 0; }.strip-container.horizontal > .label span { transform: rotate(180deg); display: block; position: relative; overflow: hidden; text-overflow: ellipsis; -webkit-writing-mode: vertical-lr; text-align: center; height: 100%; }.panel-container { position: absolute; z-index: 2; }.panel-container ::-webkit-scrollbar-thumb, .panel-container ::-webkit-scrollbar-track-piece { border-top: 1rem solid #22252c; border-bottom: 1rem solid #22252c; }.panel-container > .label { box-shadow: 0 0 0 1rem #22252c inset; }.panel-container .panel { height: 100%; overflow: auto; position: relative; padding-top: 6rem; padding-left: 6rem; margin: 0 1rem; }.panel-container .panel.stretch { display: flex; justify-content: space-between; }.panel-container .panel.stretch > .widget { width: 100%; }.panel-container .panel > .navigation:before { display: none; }.panel-container .navigation { border-top: 0; background: transparent; }.panel-container .navigation:after { background: #22252c; }.panel-container .navigation a.on { border-color: #22252c; }.panel-container .content { background: transparent; }/* BUTTONS */.toggle-container, .push-container { width: 100rem; min-height: 65rem; flex-shrink: 0; padding: 0 !important; cursor: pointer; }.toggle-container .label, .push-container .label { position: absolute; top: 0; left: 0; right: 0; bottom: 0; height: auto; padding: 29rem 10rem 26rem; line-height: 1rem; background: none !important; text-align: center; pointer-events: none; display: flex; justify-content: center; align-items: center; }.toggle { position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 1; }.toggle .light { position: absolute; left: 4rem; right: 4rem; top: 4rem; height: 4rem; background: #1c1f25; border-radius: 3rem; }.toggle.on .light { background: #528bff; }.push.on .light { animation: none; background: #528bff; }.push:active .light { background: #528bff; }.switch-container { width: 100rem; flex-shrink: 0; }.switch-container.nolabel .value:first-child { border-top: 0 !important; }.switch-container .switch { height: 100%; width: 100%; cursor: pointer; display: flex; flex-direction: column; align-items: stretch; border: 1rem solid transparent; }.switch-container .switch.horizontal { flex-direction: row; }.switch-container .switch.horizontal .value { padding: 28rem 12rem 12rem 12rem; text-align: center; display: flex; justify-content: center; flex-direction: column; }.switch-container .switch.horizontal .value:before { left: 50%; top: 8rem; width: 8rem; height: 8rem; margin-left: -4rem; margin-top: 0; }.switch-container .switch.horizontal .value:first-child { border-top: 1rem solid #282c34; }.switch-container .switch .value { background: #2d313a; color: #eee; width: 100%; height: 100%; position: relative; border-top: 1rem solid #282c34; padding: 12rem 12rem 12rem 24rem; white-space: normal; text-align: left; word-break: break-all; overflow: hidden; }.switch-container .switch .value:last-child { margin-bottom: 0; }.switch-container .switch .value:before { content: ""; position: absolute; left: 8rem; top: 50%; width: 8rem; height: 8rem; margin-top: -4rem; background: #1c1f25; border-radius: 8rem; }.switch-container .switch .value.on:before { background: #528bff; }.ripple:after { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: #528bff; animation: ripple 0.25s linear; animation-fill-mode: forwards; opacity: .4; }@keyframes ripple { 100% { opacity: 0; } }/* XY */.xy-container, .rgb-container { width: 200rem; height: 250rem; flex-shrink: 0; }.xy-container.nolabel .xy-wrapper, .rgb-container.nolabel .xy-wrapper { top: 0; }.xy-wrapper { position: absolute; top: 35rem; left: 0; right: 0; bottom: 0; overflow: hidden; padding-bottom: 60rem; }.xy-wrapper .value { width: 100%; position: absolute; bottom: 0; border-top: 1rem solid #22252c; }.xy-wrapper input { width: 50%; float: left; padding: 2rem; text-align: center; position: relative; }.xy { position: relative; width: auto; height: 100%; margin: 0 1rem; overflow: hidden; cursor: -webkit-grab; border-top: 1rem solid #22252c; background: rgba(34, 37, 44, 0.5); }.xy:active { cursor: -webkit-grabbing; }.xy:active .handle:after, .xy:active .handle:before { transform: scale(1.5); }.xy .handle { position: absolute; height: 0rem; width: 0rem; bottom: 0; left: 0; max-height: 100%; max-width: 100%; z-index: 2; pointer-events: none; }.xy .handle:before { content: ""; position: absolute; top: -4rem; right: -4rem; height: 8rem; width: 8rem; background: #528bff; border: none !important; border-radius: 100% !important; box-shadow: 0 0 0 6rem rgba(82, 139, 255, 0.2), 0 0 2rem 0 #2c3038; }.xy .handle:after { content: ""; position: absolute; top: -10rem; right: -10rem; height: 20rem; width: 20rem; border: none !important; border-radius: 100% !important; box-shadow: 0 0 0 1rem rgba(82, 139, 255, 0.2) inset; }.rgb-wrapper { padding-bottom: 90rem; }.rgb-wrapper input { width: 33.33%; }.rgb .bg { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-color: red; opacity: .75; }.rgb .bg:before, .rgb .bg:after { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 100%; }.rgb .bg:before { background: linear-gradient(to right, white 0%, rgba(255, 255, 255, 0) 100%); }.rgb .bg:after { background: linear-gradient(to bottom, transparent 0%, black 100%); }.rgb .handle:before { content: ""; position: absolute; top: -4rem; right: -4rem; height: 8rem; width: 8rem; background: #eee; border: none !important; border-radius: 100% !important; box-shadow: 0 0 0 6rem rgba(238, 238, 238, 0.2); }.rgb .handle:after { content: ""; position: absolute; top: -10rem; right: -10rem; height: 20rem; width: 20rem; border: none !important; border-radius: 100% !important; box-shadow: 0 0 0 1rem rgba(238, 238, 238, 0.2) inset; }.hue { width: auto; height: 29rem; overflow: hidden; position: absolute; bottom: 61rem; left: 1rem; right: 1rem; cursor: -webkit-grab; }.hue .bg { position: absolute; top: 0; left: 0; right: 0; bottom: 0; opacity: 0.5; background: transparent linear-gradient(to left, #F00, #FF0080, #F0F, #8000FF, #00F, #0080FF, #0FF, #00FF80, #0F0, #80FF00, #FF0, #FF8000, #F00) repeat scroll 0% 0%; }.hue:active { cursor: -webkit-grabbing; }.hue:active .handle:after { transform: scale(1.5); }.hue .handle { position: absolute; height: 100%; max-width: 100%; width: 0; z-index: 2; left: 0; bottom: 0; pointer-events: none; }.hue .handle:before { content: ""; position: absolute; top: 50%; margin-top: -4rem; right: -4rem; height: 8rem; width: 8rem; border: none !important; border-radius: 100% !important; box-shadow: none; background: #eee; }.fader-container { width: 100rem; height: 100%; }.fader-container.nolabel .fader-wrapper-outer { top: 0; }.fader-container .fader-wrapper-outer { padding-bottom: 30rem; position: absolute; top: 30rem; bottom: 0; left: 0; right: 0; }.fader-container .fader-wrapper-outer input { position: absolute; bottom: 0; }.fader-container .fader-wrapper { padding: 20rem; overflow: hidden; height: 100%; position: relative; cursor: -webkit-grab; }.fader-container .fader-wrapper:active { cursor: -webkit-grabbing; }.fader-container .fader-wrapper .fader { height: 100%; width: 4rem; background: #1c1f25; position: relative; margin: 0 auto; left: -25rem; pointer-events: none; }.fader-container .fader-wrapper .fader.nogauge .handle { background: none; }.fader-container .fader-wrapper .fader .handle { position: absolute; bottom: 0 !important; top: auto !important; width: 100%; height: 0rem; max-height: 100%; max-width: 100%; background: #528bff; z-index: 1; }.fader-container .fader-wrapper .fader .handle:before { content: ""; position: absolute; top: -4rem; left: -2rem; height: 8rem; width: 8rem; background: #528bff; border: none !important; border-radius: 100% !important; box-shadow: 0 0 0 6rem rgba(82, 139, 255, 0.2), 0 0 2rem 0 #2c3038; }.fader-container .fader-wrapper .fader .handle:after { content: ""; position: absolute; top: -10rem; left: -8rem; height: 20rem; width: 20rem; border: none !important; border-radius: 100% !important; box-shadow: 0 0 0 1rem rgba(82, 139, 255, 0.2) inset; }.fader-container .fader-wrapper .pips { position: absolute; top: 0; bottom: 0; left: 14rem; }.fader-container .fader-wrapper .pips .pip { height: 1%; width: 4rem; background: linear-gradient(#eee, transparent 1px); }.fader-container .fader-wrapper .pips .pip.val { width: 10rem; position: relative; }.fader-container .fader-wrapper .pips .pip.val span { position: relative; width: 30rem; display: block; text-align: center; font-size: 11rem; line-height: 12rem; left: 15rem; top: -5.5rem; color: #eee; }.fader-container.horizontal { min-height: 80rem; height: auto; width: 300rem; flex-shrink: 0; }.fader-container.horizontal .fader-wrapper-outer { position: relative; top: auto; padding-bottom: 30rem; height: 100%; }.fader-container.horizontal .fader-wrapper-outer .fader-wrapper { padding: 20rem 20rem 50rem; }.fader-container.horizontal .fader-wrapper-outer .fader { width: 100%; left: auto; top: 50%; height: 4rem; }.fader-container.horizontal .fader-wrapper-outer .fader .handle { height: 100% !important; width: 0; }.fader-container.horizontal .fader-wrapper-outer .fader .handle:before { top: -2rem; right: -4rem; left: auto; }.fader-container.horizontal .fader-wrapper-outer .fader .handle:after { top: -8rem; right: -10rem; left: auto; }.fader-container.horizontal .fader-wrapper-outer .pips { top: 14rem; left: 0; right: 0; font-size: 0; }.fader-container.horizontal .fader-wrapper-outer .pip { width: 1%; display: inline-block; height: 4rem; margin-bottom: 5rem; background: linear-gradient(90deg, #eee, transparent 1px); }.fader-container.horizontal .fader-wrapper-outer .pip.val { width: 1%; height: 10rem; }.fader-container.horizontal .fader-wrapper-outer .pip.val span { top: 15rem; left: -15rem; }.knob-container { width: 100rem; display: inline-flex !important; align-items: center; min-height: 135rem; flex-shrink: 0; padding-top: 15rem; }.knob-container.nolabel .knob-wrapper-outer { top: 0; }.knob-container .knob-wrapper-outer { width: 100%; top: 30rem; bottom: 0; padding-bottom: 30rem; overflow: hidden; height: 100%; display: flex; align-items: center; }.knob-container .knob-wrapper-outer input { bottom: 0; position: absolute; z-index: 1; left: 0; }.knob-container .knob-wrapper-outer .knob-wrapper { padding: 20rem; margin: 0 auto; width: 95rem; position: relative; cursor: -webkit-grab; }.knob-container .knob-wrapper-outer .knob-wrapper:active { cursor: -webkit-grabbing; }.knob-container .knob-wrapper-outer .knob-wrapper .knob-mask { width: 100%; padding-bottom: 100%; border-radius: 100%; pointer-events: none; position: relative; box-shadow: 0 0 0 4rem #1c1f25 inset; }.knob-container .knob-wrapper-outer .knob-wrapper .knob-mask:before { position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: 100%; border: 4rem solid #1c1f25; box-shadow: 0 0 0 1rem #2c3038, 0 0 0 1rem #2c3038 inset, 0 0 1rem 1rem #2c3038, 0 0 1rem 1rem #2c3038 inset; transform: rotate(45deg); z-index: 1; }.knob-container .knob-wrapper-outer .knob-wrapper .knob-mask.pan-left:before { content: ""; border-left-color: transparent; border-bottom-color: transparent; }.knob-container .knob-wrapper-outer .knob-wrapper .knob-mask.pan-left .knob:after { border-color: transparent; border-left-color: #528bff; border-top-color: #528bff; }.knob-container .knob-wrapper-outer .knob-wrapper .knob-mask.pan-right:before { content: ""; border-right-color: transparent; border-top-color: transparent; }.knob-container .knob-wrapper-outer .knob-wrapper .knob-mask.pan-right .knob:after { border-color: transparent; border-right-color: #528bff; border-bottom-color: #528bff; }.knob-container .knob-wrapper-outer .knob-wrapper .knob-mask:after { content: ""; position: absolute; top: 0rem; left: -3rem; right: -3rem; bottom: -2rem; border-radius: 100%; border: 12rem solid transparent; border-bottom-color: #2d313a; z-index: 1; }.knob-container .knob-wrapper-outer .knob-wrapper .round { content: ""; position: absolute; top: 18rem; left: 18rem; right: 18rem; bottom: 18rem; border-radius: 100%; background: #363b45; box-shadow: 0 0 0 1rem #22252c; }.knob-container .knob-wrapper-outer .knob-wrapper .knob { position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; }.knob-container .knob-wrapper-outer .knob-wrapper .knob:after { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: 100%; border: 4rem solid transparent; border-bottom-color: #528bff; }.knob-container .knob-wrapper-outer .knob-wrapper .knob.d2:after { border-right-color: #528bff; }.knob-container .knob-wrapper-outer .knob-wrapper .knob.d3:after { border-top-color: #528bff; border-right-color: #528bff; }.knob-container .knob-wrapper-outer .knob-wrapper .handle { position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; z-index: 2; }.knob-container .knob-wrapper-outer .knob-wrapper .handle:before { content: ""; position: absolute; bottom: 6rem; left: 5rem; height: 8rem; width: 8rem; background: #528bff; border: none !important; border-radius: 100% !important; box-shadow: 0 0 0 6rem rgba(82, 139, 255, 0.2), 0 0 2rem 0 #2c3038; }.knob-container .knob-wrapper-outer .knob-wrapper .handle:after { content: ""; position: absolute; bottom: 0rem; left: -1rem; height: 20rem; width: 20rem; border: none !important; border-radius: 100% !important; box-shadow: 0 0 0 1rem rgba(82, 139, 255, 0.2) inset; }.knob-container .knob-wrapper-outer .knob-wrapper .pip { position: absolute; font-size: 11rem; color: #eee; pointer-events: none; }.knob-container .knob-wrapper-outer .knob-wrapper .pip.min { bottom: 6rem; left: 0; right: 50%; width: 50%; text-align: center; }.knob-container .knob-wrapper-outer .knob-wrapper .pip.max { bottom: 6rem; left: 50%; width: 50%; right: 0; text-align: center; }.led-container { width: 100rem; flex-shrink: 0; }.led-container .led { padding: 10rem; display: flex; align-items: center; height: 100%; }.led-container .led div { border-radius: 100%; width: 40rem; height: 40rem; margin: 0 auto; overflow: hidden; background: #17191e; }.led-container .led div span { height: 100%; display: block; background-color: #528bff; } \ No newline at end of file +* { margin: 0; padding: 0; box-sizing: border-box; text-decoration: none; outline: 0; font: inherit; cursor: inherit; -webkit-tap-highlight-color: transparent; }a { cursor: pointer; display: block; }::-webkit-scrollbar { width: 20rem; height: 20rem; opacity: 1; }::-webkit-scrollbar-track-piece { background: #22252c; }::-webkit-scrollbar-track-piece:vertical { border-left: 1rem solid #17191e; }::-webkit-scrollbar-track-piece:horizontal { border-top: 1rem solid #17191e; }::-webkit-scrollbar-corner { background: transparent; }::-webkit-scrollbar-thumb { background: #2d313a; }::-webkit-scrollbar-thumb:vertical { border-left: 1rem solid #17191e; }::-webkit-scrollbar-thumb:horizontal { border-top: 1rem solid #17191e; }* { -webkit-user-select: none; }input:focus::selection { background: #528bff; color: #eee; }input { cursor: text; }html, body { height: 100%; overflow: hidden; position: relative; }html { font-size: 1px; }body { font-size: 14rem; line-height: 16rem; font-family: sans; color: #eee; white-space: nowrap; opacity: 1; cursor: default; }.btn { background: #2d313a; display: block; box-shadow: 0 0 0 1rem #17191e; padding: 15rem; position: relative; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }.btn.small { padding: 5rem; padding-right: 15rem; }.btn.disabled { pointer-events: none; color: #aaa; }.btn.align-center { text-align: center; }#lobby { background: #22252c; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 2; border: 1rem solid #17191e; display: flex; align-items: center; justify-content: center; overflow-y: auto; padding: 20rem; }#lobby .main { width: 600rem; max-height: 100%; }#lobby .header { background: #2d313a; padding: 20rem; font-weight: bold; box-shadow: 0 0 0 1rem #17191e inset; white-space: nowrap; text-overflow: ellipsis; }#lobby a { padding-right: 35rem; overflow: hidden; margin-top: 10rem; position: relative; white-space: nowrap; text-overflow: ellipsis; }#lobby a span { position: absolute; right: 0rem; top: 0rem; padding: 15rem; color: #aaa; }#container { background: #22252c; position: absolute; top: 0; left: 0; right: 0; bottom: 0; overflow: hidden; transition: right .2s; }#container.sidepanel-open { right: 300rem; }#container #open-toggle { position: absolute; right: 0; top: 2rem; width: 60rem; height: 60rem; padding: 0 10rem; line-height: 60rem; font-size: 24rem; text-align: center; color: #aaa; z-index: 2; }#container #open-toggle.sidepanel-open { color: #eee; }#sidepanel { position: absolute; z-index: 999999; width: 300rem; top: 0; right: 0; bottom: 0; margin-right: -300rem; background: #22252c; border-left: 1rem solid #17191e; transition: right .2s; overflow-y: auto; overflow-x: visible; }#sidepanel.sidepanel-open { right: 300rem; }#sidepanel #options { position: absolute; left: 0; top: 2rem; right: 0; bottom: 0; padding: 5rem; list-style: none; }#sidepanel #options li { display: block; margin-bottom: 5rem; position: relative; background: #282c34; }#sidepanel #options li:last-child { margin-bottom: 0; }#sidepanel #options li .title { padding-bottom: 15rem; }#sidepanel #options li .actions { display: flex; align-items: stretch; }#sidepanel #options li .actions a { padding: 10rem; display: block; width: 100%; text-align: center; }#sidepanel #options li .actions a.on { pointer-events: none; }#sidepanel #options li .actions a.on:after { content: ""; position: absolute; top: 0; left: 0; right: 0; border-top: 2rem solid #528bff; }#sidepanel #options li .btn + span { position: absolute; right: 0rem; top: 0rem; padding: 5rem; color: #aaa; }#sidepanel #options li > div { box-shadow: 0 0 0 1rem #17191e; padding: 15rem; }#sidepanel #options .editor .form { margin-top: 10rem; }.editing { z-index: 99999999 !important; }.widget.editing:after, a.editing:before { content: ""; z-index: 999; position: absolute; top: 1rem; left: 0; right: 0; bottom: 0; border: 1px dashed #528bff; pointer-events: none; }a { color: inherit; }.navigation { position: absolute; top: 0; left: 0; right: 0; font-size: 14rem; background: #22252c; height: 60rem; }.navigation ::first-letter { text-transform: uppercase; }.navigation:before { content: ""; position: absolute; top: 1px; left: 0; width: 100%; height: 1px; background: #282c34; z-index: 3; }.navigation:after { content: ""; position: absolute; bottom: -1px; left: 0; width: 100%; height: 1px; background: #17191e; z-index: 3; }.navigation.main { padding-right: 55rem; right: 0; }.navigation ul { list-style: none; display: flex; padding: 7rem 6rem; }.navigation ul li.on + li { border-image: none; border-left: 1rem solid transparent; }.navigation ul li { display: block; max-width: 250rem; flex: 1; border-width: 0 0 0 1rem; border-image: linear-gradient(rgba(23, 25, 30, 0), #17191e, rgba(23, 25, 30, 0)) 0 0 0 1 stretch; }.navigation ul li:first-child, .navigation ul li.on { border-image: none; border-left: 1rem solid transparent; }.navigation ul li:first-child { border-left: 0; }.navigation ul li a { display: block; padding: 5rem 10rem; line-height: 34rem; border-radius: 3rem; overflow: hidden; text-align: center; border: 1rem solid transparent; position: relative; color: #aaa; }.navigation ul li a span { display: block; width: 100%; -webkit-mask: linear-gradient(to left, transparent, #000000 10rem) no-repeat; }.navigation ul li a.on { background: #2d313a; border: 1rem solid #17191e; color: #eee; }.navigation ul li a.on:before { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; box-shadow: inset 0 1rem 1rem rgba(255, 255, 255, 0.06); background: linear-gradient(rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)); }.navigation ul li a.on:after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4rem; }.content { position: absolute; left: 0; top: 60rem; right: 0; bottom: 0; background: #282c34; z-index: 1; }.content .content { top: 60rem; }#loading { position: absolute; top: 50%; left: 50%; margin-top: -15rem; text-align: center; }#loading .spinner { display: block; margin: 0 auto; height: 30rem; width: 30rem; border-radius: 50%; border: 2rem solid #17191e; border-top-color: #528bff; animation: spin .5s linear infinite; }#loading #status { margin-top: 10rem; display: inline-block; }@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }.popup { position: fixed; top: 0; left: 0; right: 0; bottom: 0; padding: 10%; background: rgba(238, 238, 238, 0.5); z-index: 1000000; }.popup .popup-title { position: relative; padding: 15rem; background: #2d313a; }.popup .popup-title .closer { position: absolute; right: 0rem; top: 0; padding: 15rem; color: #aaa; cursor: pointer; }.popup .popup-wrapper { background: #282c34; height: 100%; width: 100%; max-width: 600rem; margin: 0 auto; position: relative; overflow: hidden; border: 1rem solid #17191e; }.popup .popup-wrapper .popup-content { height: 100%; width: 100%; padding: 10rem; overflow-y: scroll; white-space: normal; }.form label { display: block; line-height: 15rem; font-size: 10rem; }.form .info { color: #aaa; margin-bottom: 10rem; }.form input, .form .input { display: block; background: #2d313a; font: inherit; color: #eee; border: 1rem solid #17191e; width: 100%; padding: 10rem; margin-bottom: 10rem; }.form input.invalid, .form .input.invalid { box-shadow: 0 0 0 1rem rgba(255, 0, 0, 0.3) !important; }.form input:focus, .form .input:focus { border-color: #528bff; }.form input .btn, .form .input .btn { background: #363b45; box-shadow: 0 0 0 1rem #22252c; }.form .checkbox { background: #2d313a; cursor: pointer; }.form .select-wrapper { position: relative; }.form .select-wrapper:after { content: "\f107"; font-family: FontAwesome; position: absolute; padding: 10rem; right: 0; top: 0; font-size: 20rem; }.form select { -webkit-appearance: none; }.form .submit { margin-top: 30rem; }.form .separator { line-height: 30rem; height: 30rem; margin-bottom: 5rem; position: relative; display: flex; align-items: center; }.form .separator:before, .form .separator:after { content: ""; top: 14rem; width: 100%; height: 1rem; background: #aaa; }.form .separator span { font-variant: small-caps; position: relative; display: block; width: 100%; text-align: center; }.tab.on.stretch { display: flex; justify-content: space-between; }.tab.on.stretch > .widget { width: 100%; }.tab { display: none; overflow: auto; position: relative; padding-top: 7rem; padding-left: 6rem; }.tab.on { display: block; height: 100%; width: auto; }.widget { display: inline-block; height: auto; min-width: 100rem; overflow: hidden; position: relative; font-size: 13rem; padding: 35rem 0 0; vertical-align: top; box-shadow: 0 0 0 1rem #22252c inset; background: #2d313a; background-clip: padding-box; -webkit-tap-highlight-color: transparent; border-right: 6rem solid transparent; border-bottom: 6rem solid transparent; }.widget:before { position: absolute; top: 1rem; left: 0; right: 0; height: 4rem; box-shadow: inset 0 1rem 1rem rgba(255, 255, 255, 0.06); z-index: 3; pointer-events: none; }.widget.absolute-position { position: absolute; z-index: 10; border: 0 !important; }.widget.nolabel { padding-top: 0; }.widget.nolabel > .label { display: none; }.widget .label { padding: 10rem 10rem; position: absolute; top: 0; left: 0; right: 0; text-overflow: ellipsis; overflow: hidden; height: 35rem; }.widget .label.accent { color: #528bff; }.widget input { width: 100%; height: 30rem; border: 0; background: transparent; color: #aaa; display: block; padding: 10rem; }.widget input:focus { color: #528bff; }.widget input[disabled] { color: #aaa; }.ui-resizable-handle { position: absolute; border: 2rem solid transparent; z-index: 100000; }.ui-resizable-handle.ui-resizable-se { bottom: 5rem; right: 5rem; width: 15rem; height: 15rem; border-right: 2rem solid #528bff; border-bottom: 2rem solid #528bff; cursor: se-resize; }.ui-resizable-handle.ui-resizable-e { top: 50%; margin-top: -7.5rem; right: 5rem; width: 15rem; height: 15rem; border-right: 2rem solid #528bff; cursor: e-resize; }.ui-resizable-handle.ui-resizable-s { bottom: 5rem; left: 50%; margin-left: -7.5rem; width: 15rem; height: 15rem; border-bottom: 2rem solid #528bff; cursor: s-resize; }.ui-helper { border: 1rem dashed #528bff; background: rgba(82, 139, 255, 0.25); min-width: 30rem !important; min-height: 30rem !important; z-index: 99999999999 !important; }.ui-draggable-handle { position: absolute; position: absolute; top: 5rem; left: 5rem; z-index: 100000; cursor: -webkit-grab; width: 15rem; height: 15rem; border: 2rem solid #528bff; }.ui-draggable-handle:active { cursor: -webkit-grabbing; }/* STRIP (contains any widgets) */.strip-container { padding-top: 35rem; width: 100rem; height: 100%; overflow: visible; background: none; box-shadow: none; }.strip-container > .label { background: #2d313a; box-shadow: 0 0 0 1rem #22252c inset; }.strip-container.nolabel { padding: 0 !important; }.strip-container .strip { height: 100%; display: flex; flex-direction: column; }.strip-container .strip > .widget { display: block; width: auto; }.strip-container.vertical { padding-top: 35rem; }.strip-container.vertical .strip > .widget { border: 0 !important; min-width: auto !important; max-width: 100%; margin-top: -1rem; }.strip-container.horizontal { padding-top: 0; padding-left: 35rem; width: 100%; height: 130rem; min-height: 100rem; display: block; }.strip-container.horizontal .strip { flex-direction: row; }.strip-container.horizontal .strip > .widget { flex-shrink: initial; width: 100%; min-height: 100%; max-height: 100%; border-right: 0 !important; border-bottom: 0 !important; margin-left: -1rem; }.strip-container.horizontal > .label { width: 35rem; height: 100%; left: 0; top: 0; }.strip-container.horizontal > .label span { transform: rotate(180deg); display: block; position: relative; overflow: hidden; text-overflow: ellipsis; -webkit-writing-mode: vertical-lr; text-align: center; height: 100%; }.panel-container { position: absolute; z-index: 2; }.panel-container ::-webkit-scrollbar-thumb, .panel-container ::-webkit-scrollbar-track-piece { border-top: 1rem solid #22252c; border-bottom: 1rem solid #22252c; }.panel-container > .label { box-shadow: 0 0 0 1rem #22252c inset; }.panel-container .panel { height: 100%; overflow: auto; position: relative; padding-top: 6rem; padding-left: 6rem; margin: 0 1rem; }.panel-container .panel.stretch { display: flex; justify-content: space-between; }.panel-container .panel.stretch > .widget { width: 100%; }.panel-container .panel > .navigation:before { display: none; }.panel-container .navigation { border-top: 0; background: transparent; }.panel-container .navigation:after { background: #22252c; }.panel-container .navigation a.on { border-color: #22252c; }.panel-container .content { background: transparent; }/* BUTTONS */.toggle-container, .push-container { width: 100rem; min-height: 65rem; flex-shrink: 0; padding: 0 !important; cursor: pointer; }.toggle-container .label, .push-container .label { position: absolute; top: 0; left: 0; right: 0; bottom: 0; height: auto; padding: 29rem 10rem 26rem; line-height: 1rem; background: none !important; text-align: center; pointer-events: none; display: flex; justify-content: center; align-items: center; }.toggle { position: absolute; top: 0; left: 0; right: 0; bottom: 0; }.toggle .light { position: absolute; left: 4rem; right: 4rem; top: 4rem; height: 4rem; background: #1c1f25; border-radius: 3rem; }.toggle.on .light { background: #528bff; }.push.on .light { animation: none; background: #528bff; }.push:active .light { background: #528bff; }.switch-container { width: 100rem; flex-shrink: 0; }.switch-container.nolabel .value:first-child { border-top: 0 !important; }.switch-container .switch { height: 100%; width: 100%; cursor: pointer; display: flex; flex-direction: column; align-items: stretch; border: 1rem solid transparent; }.switch-container .switch.horizontal { flex-direction: row; }.switch-container .switch.horizontal .value { padding: 28rem 12rem 12rem 12rem; text-align: center; display: flex; justify-content: center; flex-direction: column; }.switch-container .switch.horizontal .value:before { left: 50%; top: 8rem; width: 8rem; height: 8rem; margin-left: -4rem; margin-top: 0; }.switch-container .switch.horizontal .value:first-child { border-top: 1rem solid #282c34; }.switch-container .switch .value { background: #2d313a; color: #eee; width: 100%; height: 100%; position: relative; border-top: 1rem solid #282c34; padding: 12rem 12rem 12rem 24rem; white-space: normal; text-align: left; word-break: break-all; overflow: hidden; }.switch-container .switch .value:last-child { margin-bottom: 0; }.switch-container .switch .value:before { content: ""; position: absolute; left: 8rem; top: 50%; width: 8rem; height: 8rem; margin-top: -4rem; background: #1c1f25; border-radius: 8rem; }.switch-container .switch .value.on:before { background: #528bff; }.ripple:after { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: #528bff; animation: ripple 0.25s linear; animation-fill-mode: forwards; opacity: .4; }@keyframes ripple { 100% { opacity: 0; } }/* XY */.xy-container, .rgb-container { width: 200rem; height: 250rem; flex-shrink: 0; }.xy-container.nolabel .xy-wrapper, .rgb-container.nolabel .xy-wrapper { top: 0; }.xy-wrapper { position: absolute; top: 35rem; left: 0; right: 0; bottom: 0; overflow: hidden; padding-bottom: 60rem; }.xy-wrapper .value { width: 100%; position: absolute; bottom: 0; border-top: 1rem solid #22252c; }.xy-wrapper input { width: 50%; float: left; padding: 2rem; text-align: center; position: relative; }.xy { position: relative; width: auto; height: 100%; margin: 0 1rem; overflow: hidden; cursor: -webkit-grab; border-top: 1rem solid #22252c; background: rgba(34, 37, 44, 0.5); }.xy:active { cursor: -webkit-grabbing; }.xy:active .handle:after, .xy:active .handle:before { transform: scale(1.5); }.xy .handle { position: absolute; bottom: 0; left: 0; z-index: 2; pointer-events: none; backface-visibility: hidden; transform-origin: center; transform: translate3d(0, 0, 0); }.xy .handle:before { content: ""; position: absolute; top: -4rem; right: -4rem; height: 8rem; width: 8rem; background: #528bff; border: none !important; border-radius: 100% !important; box-shadow: 0 0 0 6rem rgba(82, 139, 255, 0.2), 0 0 2rem 0 #2c3038; }.xy .handle:after { content: ""; position: absolute; top: -10rem; right: -10rem; height: 20rem; width: 20rem; border: none !important; border-radius: 100% !important; box-shadow: 0 0 0 1rem rgba(82, 139, 255, 0.2) inset; }.rgb-wrapper { padding-bottom: 90rem; }.rgb-wrapper input { width: 33.33%; }.rgb .bg { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-color: red; opacity: .75; }.rgb .bg:before, .rgb .bg:after { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 100%; }.rgb .bg:before { background: linear-gradient(to right, white 0%, rgba(255, 255, 255, 0) 100%); }.rgb .bg:after { background: linear-gradient(to bottom, transparent 0%, black 100%); }.rgb .handle:before { content: ""; position: absolute; top: -4rem; right: -4rem; height: 8rem; width: 8rem; background: #eee; border: none !important; border-radius: 100% !important; box-shadow: 0 0 0 6rem rgba(238, 238, 238, 0.2); }.rgb .handle:after { content: ""; position: absolute; top: -10rem; right: -10rem; height: 20rem; width: 20rem; border: none !important; border-radius: 100% !important; box-shadow: 0 0 0 1rem rgba(238, 238, 238, 0.2) inset; }.hue { width: auto; height: 29rem; overflow: hidden; position: absolute; bottom: 61rem; left: 1rem; right: 1rem; cursor: -webkit-grab; }.hue .bg { position: absolute; top: 0; left: 0; right: 0; bottom: 0; opacity: 0.5; background: transparent linear-gradient(to left, #F00, #FF0080, #F0F, #8000FF, #00F, #0080FF, #0FF, #00FF80, #0F0, #80FF00, #FF0, #FF8000, #F00) repeat scroll 0% 0%; }.hue:active { cursor: -webkit-grabbing; }.hue:active .handle:after { transform: scale(1.5); }.hue .handle { position: absolute; z-index: 2; left: 0; top: 50%; pointer-events: none; transform: translate3d(0, 0, 0); }.hue .handle:before { content: ""; position: absolute; top: -4rem; right: -4rem; height: 8rem; width: 8rem; border: none !important; border-radius: 100% !important; box-shadow: none; background: #eee; }.fader-container { width: 100rem; min-height: 200rem; height: 100%; }.fader-container.nolabel .fader-wrapper-outer { top: 0; }.fader-container .fader-wrapper-outer { padding-bottom: 30rem; position: absolute; top: 30rem; bottom: 0; left: 0; right: 0; }.fader-container .fader-wrapper-outer input { position: absolute; bottom: 0; }.fader-container .fader-wrapper { padding: 20rem; overflow: hidden; height: 100%; position: relative; cursor: -webkit-grab; }.fader-container .fader-wrapper:active { cursor: -webkit-grabbing; }.fader-container .fader-wrapper .fader { height: 100%; width: 4rem; background: #1c1f25; position: relative; margin: 0 auto; left: -25rem; pointer-events: none; }.fader-container .fader-wrapper .fader.nogauge .handle { background: none; }.fader-container .fader-wrapper .fader .handle { position: absolute; bottom: 0 !important; top: auto !important; width: 100%; height: 100%; transform-origin: bottom; max-height: 100%; max-width: 100%; background: #528bff; z-index: 1; transform-style: preserve-3d; backface-visibility: hidden; }.fader-container .fader-wrapper .fader .handle span { position: absolute; bottom: 0; top: 0; width: 100%; height: 100%; transform-origin: top; backface-visibility: hidden; }.fader-container .fader-wrapper .fader .handle span:before { content: ""; position: absolute; top: -4rem; left: -2rem; height: 8rem; width: 8rem; background: #528bff; border: none !important; border-radius: 100% !important; box-shadow: 0 0 0 6rem rgba(82, 139, 255, 0.2), 0 0 2rem 0 #2c3038; }.fader-container .fader-wrapper .fader .handle span:after { content: ""; position: absolute; top: -10rem; left: -8rem; height: 20rem; width: 20rem; border: none !important; border-radius: 100% !important; box-shadow: 0 0 0 1rem rgba(82, 139, 255, 0.2) inset; }.fader-container .fader-wrapper .pips { position: absolute; top: 0; bottom: 0; left: 14rem; }.fader-container .fader-wrapper .pips .pip { height: 1%; width: 4rem; background: linear-gradient(#eee, transparent 1px); }.fader-container .fader-wrapper .pips .pip.val { width: 10rem; position: relative; }.fader-container .fader-wrapper .pips .pip.val span { position: relative; width: 30rem; display: block; text-align: center; font-size: 11rem; line-height: 12rem; left: 15rem; top: -5.5rem; color: #eee; }.fader-container.horizontal { min-height: 80rem; height: auto; width: 300rem; flex-shrink: 0; }.fader-container.horizontal .fader-wrapper-outer { position: relative; top: auto; padding-bottom: 30rem; height: 100%; }.fader-container.horizontal .fader-wrapper-outer .fader-wrapper { padding: 20rem 20rem 50rem; }.fader-container.horizontal .fader-wrapper-outer .fader { width: 100%; left: auto; top: 50%; height: 4rem; }.fader-container.horizontal .fader-wrapper-outer .fader .handle { height: 100%important; width: 100%; transform-origin: left; }.fader-container.horizontal .fader-wrapper-outer .fader .handle span { transform-origin: right; }.fader-container.horizontal .fader-wrapper-outer .fader .handle span:before { top: -2rem; right: -4rem; left: auto; }.fader-container.horizontal .fader-wrapper-outer .fader .handle span:after { top: -8rem; right: -10rem; left: auto; }.fader-container.horizontal .fader-wrapper-outer .pips { top: 14rem; left: 0; right: 0; font-size: 0; }.fader-container.horizontal .fader-wrapper-outer .pip { width: 1%; display: inline-block; height: 4rem; margin-bottom: 5rem; background: linear-gradient(90deg, #eee, transparent 1px); }.fader-container.horizontal .fader-wrapper-outer .pip.val { width: 1%; height: 10rem; }.fader-container.horizontal .fader-wrapper-outer .pip.val span { top: 15rem; left: -15rem; }.knob-container { width: 100rem; display: inline-flex !important; align-items: center; min-height: 135rem; flex-shrink: 0; padding-top: 15rem; }.knob-container.nolabel .knob-wrapper-outer { top: 0; }.knob-container .knob-wrapper-outer { width: 100%; top: 30rem; bottom: 0; padding-bottom: 30rem; overflow: hidden; height: 100%; display: flex; align-items: center; }.knob-container .knob-wrapper-outer input { bottom: 0; position: absolute; left: 0; }.knob-container .knob-wrapper-outer .knob-wrapper { padding: 20rem; margin: 0 auto; width: 95rem; position: relative; cursor: -webkit-grab; }.knob-container .knob-wrapper-outer .knob-wrapper:active { cursor: -webkit-grabbing; }.knob-container .knob-wrapper-outer .knob-wrapper .knob-mask { width: 100%; padding-bottom: 100%; border-radius: 100%; pointer-events: none; position: relative; box-shadow: 0 0 0 4rem #1c1f25 inset; }.knob-container .knob-wrapper-outer .knob-wrapper .knob-mask:before { position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: 100%; border: 4rem solid #1c1f25; box-shadow: 0 0 0 1rem #2c3038, 0 0 0 1rem #2c3038 inset, 0 0 1rem 1rem #2c3038, 0 0 1rem 1rem #2c3038 inset; transform: rotate(45deg); z-index: 1; }.knob-container .knob-wrapper-outer .knob-wrapper .knob-mask.pan-left:before { content: ""; border-left-color: transparent; border-bottom-color: transparent; }.knob-container .knob-wrapper-outer .knob-wrapper .knob-mask.pan-left .knob:after { border-color: transparent; border-left-color: #528bff; border-top-color: #528bff; }.knob-container .knob-wrapper-outer .knob-wrapper .knob-mask.pan-right:before { content: ""; border-right-color: transparent; border-top-color: transparent; }.knob-container .knob-wrapper-outer .knob-wrapper .knob-mask.pan-right .knob:after { border-color: transparent; border-right-color: #528bff; border-bottom-color: #528bff; }.knob-container .knob-wrapper-outer .knob-wrapper .knob-mask:after { content: ""; position: absolute; top: 0rem; left: -3rem; right: -3rem; bottom: -2rem; border-radius: 100%; border: 12rem solid transparent; border-bottom-color: #2d313a; z-index: 2; }.knob-container .knob-wrapper-outer .knob-wrapper .round { content: ""; position: absolute; top: 18rem; left: 18rem; right: 18rem; bottom: 18rem; border-radius: 100%; background: #363b45; box-shadow: 0 0 0 1rem #22252c; }.knob-container .knob-wrapper-outer .knob-wrapper .knob { position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; transform: rotateZ(0deg); backface-visibility: hidden; z-index: 2; }.knob-container .knob-wrapper-outer .knob-wrapper .knob:after { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: 100%; border: 4rem solid transparent; border-bottom-color: #528bff; }.knob-container .knob-wrapper-outer .knob-wrapper .knob.d2:after { border-right-color: #528bff; }.knob-container .knob-wrapper-outer .knob-wrapper .knob.d3:after { border-top-color: #528bff; border-right-color: #528bff; }.knob-container .knob-wrapper-outer .knob-wrapper .handle { position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; transform: rotateZ(0deg); backface-visibility: hidden; z-index: 3; }.knob-container .knob-wrapper-outer .knob-wrapper .handle:before { content: ""; position: absolute; bottom: 6rem; left: 5rem; height: 8rem; width: 8rem; background: #528bff; border: none !important; border-radius: 100% !important; box-shadow: 0 0 0 6rem rgba(82, 139, 255, 0.2), 0 0 2rem 0 #2c3038; }.knob-container .knob-wrapper-outer .knob-wrapper .handle:after { content: ""; position: absolute; bottom: 0rem; left: -1rem; height: 20rem; width: 20rem; border: none !important; border-radius: 100% !important; box-shadow: 0 0 0 1rem rgba(82, 139, 255, 0.2) inset; }.knob-container .knob-wrapper-outer .knob-wrapper .pip { position: absolute; font-size: 11rem; color: #eee; pointer-events: none; }.knob-container .knob-wrapper-outer .knob-wrapper .pip.min { bottom: 6rem; left: 0; right: 50%; width: 50%; text-align: center; }.knob-container .knob-wrapper-outer .knob-wrapper .pip.max { bottom: 6rem; left: 50%; width: 50%; right: 0; text-align: center; }.led-container { width: 100rem; flex-shrink: 0; }.led-container .led { padding: 10rem; display: flex; align-items: center; height: 100%; }.led-container .led div { border-radius: 100%; width: 40rem; height: 40rem; margin: 0 auto; overflow: hidden; background: #17191e; }.led-container .led div span { height: 100%; display: block; background-color: #528bff; } \ No newline at end of file diff --git a/app/browser/js/app/utils.js b/app/browser/js/app/utils.js index d6032b08..56cb7a7d 100644 --- a/app/browser/js/app/utils.js +++ b/app/browser/js/app/utils.js @@ -231,7 +231,9 @@ rgbToHsb = function (rgb) { return hsb } - +sizeToAngle = function(size) { + return clip(Math.acos((size/100))*180/Math.PI,[0,90]) +} clip = function(value,range) { var max = Math.max, min = Math.min, diff --git a/app/browser/js/app/widgets.js b/app/browser/js/app/widgets.js index 5181849f..8eed5aee 100644 --- a/app/browser/js/app/widgets.js +++ b/app/browser/js/app/widgets.js @@ -452,7 +452,7 @@ createWidget.xy = function(widgetData) { var widget = $(`
-
+
@@ -481,6 +481,7 @@ createWidget.xy = function(widgetData) { pad.resize(function(){ pad.width = pad.innerWidth() pad.height = pad.innerHeight() + handle[0].setAttribute('style',`transform:translate3d(${pad.width*handle.width/100}px, -${pad.height*handle.height/100}px,0)`) }) var off = {x:0,y:0} @@ -488,7 +489,9 @@ createWidget.xy = function(widgetData) { if (absolute || data.ctrlKey || data.shiftKey) { var h = ((pad.height-data.offsetY) * 100 / pad.height), w = (data.offsetX * 100 / pad.width) - handle[0].setAttribute('style','height:'+h+'%;width:'+w+'%') + + handle[0].setAttribute('style',`transform:translate3d(${pad.width*w/100}px, -${pad.height*h/100}px,0)`) + handle.height = h handle.width = w @@ -509,7 +512,10 @@ createWidget.xy = function(widgetData) { var h = clip((-data.deltaY)*100/pad.height+off.y,[0,100]), w = clip((data.deltaX)*100/pad.width+off.x,[0,100]) - handle[0].setAttribute('style','height:'+h+'%;width:'+w+'%') + + handle[0].setAttribute('style',`transform:translate3d(${pad.width*w/100}px, -${pad.height*h/100}px,0)`) + + // handle[0].setAttribute('style','height:'+h+'%;width:'+w+'%') handle.height = h handle.width = w @@ -634,6 +640,8 @@ createWidget.rgb = function(widgetData) { pad.resize(function(){ pad.width = pad.innerWidth() pad.height = pad.innerHeight() + rgbHandle[0].setAttribute('style',`transform:translate3d(${pad.width*rgbHandle.width/100}px, -${pad.height*rgbHandle.height/100}px,0)`) + }) @@ -642,7 +650,8 @@ createWidget.rgb = function(widgetData) { if (absolute || data.ctrlKey || data.shiftKey) { var h = ((pad.height-data.offsetY) * 100 / pad.height), w = (data.offsetX * 100 / pad.width) - rgbHandle[0].setAttribute('style','height:'+h+'%;width:'+w+'%') + + rgbHandle[0].setAttribute('style',`transform:translate3d(${pad.width*w/100}px, -${pad.height*h/100}px,0)`) rgbHandle.height = h rgbHandle.width = w @@ -663,7 +672,8 @@ createWidget.rgb = function(widgetData) { var h = clip((-data.deltaY)*100/pad.height+rgbOff.y,[0,100]), w = clip(data.deltaX*100/pad.width+rgbOff.x,[0,100]) - rgbHandle[0].setAttribute('style','height:'+h+'%;width:'+w+'%') + + rgbHandle[0].setAttribute('style',`transform:translate3d(${pad.width*w/100}px, -${pad.height*h/100}px,0)`) rgbHandle.height = h rgbHandle.width = w @@ -680,7 +690,7 @@ createWidget.rgb = function(widgetData) { huePad.on('draginit',function(e,data){ if (absolute || data.ctrlKey || data.shiftKey) { var d = (data.offsetX * 100 / pad.width) - hueHandle[0].setAttribute('style','width:'+d+'%') + hueHandle[0].setAttribute('style',`transform:translate3d(${pad.width*d/100}px,0,0)`) hueHandle.width = d @@ -709,7 +719,7 @@ createWidget.rgb = function(widgetData) { if (data.shiftKey) return var w = clip(data.deltaX*100/pad.width+hueOff,[0,100]) - hueHandle[0].setAttribute('style','width:'+w+'%') + hueHandle[0].setAttribute('style',`transform:translate3d(${pad.width*w/100}px,0,0)`) hueHandle.width = w var h = clip(hueHandle.width*3.6,[0,360]), @@ -750,8 +760,8 @@ createWidget.rgb = function(widgetData) { h = mapToScale(hsb.b,[0,100],[0,100]), hueW = mapToScale(hsb.h,[0,360],[0,100]) - rgbHandle[0].setAttribute('style','height:'+h+'%;width:'+w+'%') - hueHandle[0].setAttribute('style','width:'+hueW+'%') + rgbHandle[0].setAttribute('style',`transform:translate3d(${pad.width*w/100}px, -${pad.height*h/100}px,0)`) + hueHandle[0].setAttribute('style',`transform:translate3d(${pad.width*hueW/100}px,0,0)`) rgbHandle.height = h rgbHandle.width = w @@ -831,7 +841,7 @@ createWidget.fader = function(widgetData,container){
-
+
@@ -839,12 +849,14 @@ createWidget.fader = function(widgetData,container){
`), handle = widget.find('.handle'), + knob = widget.find('span')[0], wrapper = widget.find('.fader-wrapper'), fader = widget.find('.fader'), pips = widget.find('.pips'), input = widget.find('input'), unit = widgetData.unit?' '+widgetData.unit.trim(): '', dimension = widgetData.horizontal?'width':'height', + axe = dimension=='height'?'X':'Y', absolute = widgetData.absolute if (widgetData.horizontal) container.addClass('horizontal') @@ -866,7 +878,9 @@ createWidget.fader = function(widgetData,container){ var d = (dimension=='height')? ((fader.size-data.offsetY+(wrapper.size-fader.size)/2) * 100 / fader.size): (data.offsetX - (wrapper.size-fader.size)/2) * 100 / fader.size - handle[0].setAttribute('style',dimension+':'+d+'%') + var r = sizeToAngle(d) + handle[0].setAttribute('style','transform:rotate'+axe+'('+ r +'deg)') + knob.setAttribute('style','transform:rotate'+axe+'('+ (-r) +'deg)') handle.size = d var v = widget.getValue() @@ -888,8 +902,11 @@ createWidget.fader = function(widgetData,container){ if (data.shiftKey) return var d = (dimension=='height')?-data.deltaY:data.deltaX - d = clip(d*100/fader.size+off,[0,100]) - handle[0].setAttribute('style',dimension+':'+d+'%') + d = clip(d*100/fader.size+off,[0,100]) + var r = sizeToAngle(d) + + handle[0].setAttribute('style','transform:rotate'+axe+'('+ r +'deg)') + knob.setAttribute('style','transform:rotate'+axe+'('+ (-r) +'deg)') handle.size = d var v = widget.getValue() diff --git a/app/browser/scss/style.scss b/app/browser/scss/style.scss index 295dbe41..aeabcd80 100644 --- a/app/browser/scss/style.scss +++ b/app/browser/scss/style.scss @@ -699,7 +699,6 @@ a { } .label { - z-index: 1; padding:10rem 10rem; position:absolute; top:0; @@ -951,7 +950,6 @@ a { left:0; right:0; bottom:0; - z-index: 1; .light { position: absolute; @@ -1120,15 +1118,14 @@ a { } .handle { position:absolute; - height:0rem; - width:0rem; bottom:0; left:0; - max-height:100%; - max-width:100%; z-index:2; - pointer-events: none; + backface-visibility: hidden; + transform-origin: center; + transform:translate3d(0,0,0); + &:before { content:""; position: absolute; @@ -1241,17 +1238,15 @@ a { } .handle { position:absolute; - height:100%; - max-width: 100%; - width:0; z-index:2; left:0; - bottom:0; + top:50%; pointer-events: none; + transform: translate3d(0,0,0); &:before { content:""; position: absolute; - top:50%;margin-top:-4rem; + top:-4rem; right:-4rem; height:8rem; width:8rem; @@ -1273,6 +1268,7 @@ a { .fader-container { width:100rem; + min-height: 200rem; height:100%; &.nolabel .fader-wrapper-outer { @@ -1319,13 +1315,24 @@ a { bottom:0!important; top:auto!important; width:100%; - height:0rem; + height:100%; + transform-origin: bottom; max-height:100%; max-width:100%; background:$color-accent; z-index: 1; - - &:before { + transform-style: preserve-3d; + backface-visibility: hidden; + span { + position: absolute; + bottom:0; + top:0; + width:100%; + height:100%; + transform-origin: top; + backface-visibility: hidden; + } + span:before { content:""; position: absolute; top:-4rem; @@ -1337,7 +1344,7 @@ a { border-radius: 100%!important; box-shadow: 0 0 0 6rem transparentize($color-accent,.8),0 0 2rem 0 mix($color-text,$color-fg,2); } - &:after { + span:after { content:""; position: absolute; top:-10rem; @@ -1401,14 +1408,18 @@ a { top:50%; height:4rem; .handle { - height:100%!important; - width:0; - &:before { + height:100%important; + width:100%; + transform-origin: left; + span { + transform-origin: right; + } + span:before { top:-2rem; right:-4rem; left:auto; } - &:after { + span:after { top:-8rem; right:-10rem; left:auto @@ -1464,7 +1475,6 @@ a { input { bottom:0; position: absolute; - z-index: 1; left:0; } @@ -1533,7 +1543,7 @@ a { border-radius:100%; border:12rem solid transparent; border-bottom-color: $color-raised; - z-index:1; + z-index:2; } } .round { @@ -1554,6 +1564,9 @@ a { right:0; bottom:0; pointer-events: none; + transform:rotateZ(0deg); + backface-visibility: hidden; + z-index: 2; &:after { @@ -1584,7 +1597,9 @@ a { right:0; bottom:0; pointer-events: none; - z-index: 2; + transform:rotateZ(0deg); + backface-visibility: hidden; + z-index: 3; &:before { content:""; position: absolute;