open-stage-control/browser/css/style.scss
jean-emmanuel 6ef7a4a1f8 - new session file format
- inpector data now stored at parsing (no more recursive search)
- 'accent' color option for widgets
- widget title renamed to label
2015-09-10 14:48:47 +02:00

1094 lines
21 KiB
SCSS

/////////////
$theme: 'dark';
@if $theme == 'dark' {
$color-text-base: white;
}
@if $theme == 'light' {
$color-text-base: black;
}
$color-base: black;
$color-text:rgba($color-text-base,.8);
$color-text-fade:transparentize($color-text,.4);
$color-fg:#282c34;
$color-bg:mix($color-fg,$color-base,85);
$color-accent:#528bff;
$color-border:mix($color-fg,$color-base,65);
$nav-height:50px;
$bg-title:rgba(white,.05);
$bg-button:linear-gradient(mix($color-text,$color-fg,8), mix($color-text,$color-fg,5));
$bg-button-hover:linear-gradient(mix($color-text,$color-fg,10), mix($color-text,$color-fg,7));
$bg-button-on:linear-gradient(mix($color-text,$color-bg,0), mix($color-text,$color-bg,5));
$sidepanel-size:300px;
@mixin layer {
position: absolute;
top:0;
left:0;
right: 0;
bottom:0;
}
/////////////
* {
margin:0;
padding:0;
box-sizing:border-box;
text-decoration:none;
outline:0;
font:inherit;
cursor: inherit;
}
a {
cursor: pointer;
display: block;
}
$scrollbar-margin:2px;
::-webkit-scrollbar {
width: 10px;
height:10px;opacity:1;
}
::-webkit-scrollbar-track-piece {
background: rgba(0,0,0,.2);
&:vertical {
border-left:$scrollbar-margin solid $color-fg;
}
&:horizontal {
border-top:$scrollbar-margin solid $color-fg;
}
}
::-webkit-scrollbar-corner {
background: none;
}
::-webkit-scrollbar-thumb {
background:$bg-button;
opacity:1;
&:vertical {
border:$scrollbar-margin solid $color-fg;
}
&:horizontal {
border:$scrollbar-margin solid $color-fg;
}
}
* {
-webkit-user-select: none;
}
.inspector *{
-webkit-user-select: initial;
}
.inspector *::selection{
background:$color-accent!important;
}
input:focus::selection{
background:$color-accent;
}
input {
cursor: text;
}
html, body {
height:100%;
overflow:hidden;
position:relative;
}
body {
font-size:14px;
line-height:16px;
font-family:sans;
color:$color-text;
white-space:nowrap;
opacity:1;
cursor: default;
}
.btn {
background: $bg-button;
display: block;
border:1px solid $color-border;
padding:15px;
}
a.btn {
&:hover {
background: $bg-button-hover;
}
}
#lobby {
background: $color-bg;
@include layer();
z-index: 2;
border:1px solid $color-border;
display: flex;
align-items: center;
justify-content: center;
overflow-y: auto;
padding:20px;
.main {
width:600px;
max-height:100%;
}
.header {
background: $bg-button;
padding:20px;
font-weight:bold;
box-shadow: 0 0 0 1px $color-border inset;
white-space: nowrap;
text-overflow: ellipsis;
}
a {
padding-right:35px;
overflow: hidden;
margin-top:10px;
position: relative;
white-space: nowrap;
text-overflow: ellipsis;
span {
position: absolute;
right:0px;
top:0px;
padding:15px;
color:$color-text-fade;
&:hover {
color:$color-text
}
}
}
}
#container {
background: $color-bg;
@include layer();
overflow:hidden;
transition:right .3s;
&.sidepanel-open {
right:$sidepanel-size;
}
#open-toggle {
position:absolute;
top:7px;
right:0;
width:60px;
height:$nav-height - 10px;
padding:0 10px;
line-height: $nav-height - 10px;
font-size: 21px;
text-align: center;
color:$color-text-fade;
&.sidepanel-open {
color:$color-text
}
}
}
#sidepanel {
position:absolute;
z-index: 999999;
width:$sidepanel-size;
top:0;
right:0;
bottom:0;
margin-right:-$sidepanel-size;
background:$color-fg;
border-left:1px solid $color-border;
//box-shadow: 0 0 10px 0 $color-border;
transition:right .3s;
overflow-y: auto;
overflow-x: visible;
&.sidepanel-open {
right:$sidepanel-size;
}
#options {
position:absolute;
left:0;top:2px;
right:0;bottom:0;
padding:5px;
list-style:none;
background:$color-fg;
li {
display:block;
margin-bottom:5px;
background:$bg-button;
}
.inspector {
padding: 10px;
.result {
background: $color-border;
border-radius: 3px;
margin-top: 10px;
padding:10px;
color:$color-text-fade;
white-space: pre;
word-wrap: break-word;
width:100%;
max-height: 300px;
overflow-y: auto;
&::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb {
border-color:$color-border!important
}
&::-webkit-scrollbar-thumb{
background:$color-bg!important;
opacity:0.6!important;
}
}
}
}
}
.nicescroll-rails-hr {
margin-top:3px;
}
.nicescroll-rails-vr {
display:none!important;
}
a {
color:inherit;
}
.navigation {
position:absolute;
top:0;
left:0;
right:0;
z-index:20;
padding:7px 0px 0;
font-size:14px;
box-shadow:0;
::first-letter {
text-transform: uppercase;
}
&.sub {
padding-top:7px;
ul {
//padding:0;
}
li {
border-image: linear-gradient($color-fg, $color-border 20px) 0 0 0 1 stretch;
}
a {
line-height: ($nav-height - 22px);
}
}
&.main {
right:55px;
}
ul {
list-style:none;
display: flex;
padding:0 5px;
li.on + li {border-image:none;border-left:1px solid transparent;}
li {
display:block;
max-width:250px;
flex: 1;
border-width:0 0 0 1px;
border-image: linear-gradient($color-bg, $color-border 20px) 0 0 0 1 stretch;
&:first-child, &.on {
border-image:none;
border-left:1px solid transparent;
}
&:first-child {
border-left:0;
}
a {
display:block;
padding: 5px 10px;
line-height: ($nav-height - 22px);
border-radius:3px 3px 0 0;
overflow:hidden;
text-align:center;
border:1px solid transparent;
position:relative;
span {
display:block;
width:100%;
-webkit-mask: linear-gradient(to left, rgba(0, 0, 0, 0), #000000 10px) no-repeat;
}
color:$color-text-fade;
&.on {
background:$color-fg;
border:1px solid $color-border;
border-bottom-color:$color-fg;
color:$color-text;
&:before {
content:"";
position: absolute;
top:0;
left:0;
right:0;
bottom:0;
box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.06);
background:linear-gradient(rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0))
}
&:after {
content:"";
position:absolute;
top:0;
left:0;
right:0;
height:4px;
// background:linear-gradient(rgba($color-accent,0.5),rgba($color-accent,0))
}
}
}
}
}
}
.content {
position:absolute;
left:0;
top:$nav-height - 4px;
right:0;
bottom:0;
border-top:1px solid $color-border;
background:$color-fg;
.tab {
//height:100%;
font-size:0;
//position:relative;
overflow: auto;
}
.content {
border-top:1px solid $color-border;
top:$nav-height - 4px;
}
}
.tab {
display:block;
height:0px;
width: 0px;
overflow: hidden;
position: relative;
&.on {
height:100%;
width:auto;
}
}
.test.tab.on {
display:flex;width:100%;
flex-wrap: wrap;
flex-direction:column;
//justify-content: stretch;
> .widget {
height:33.33%;
padding-bottom:10px;
//flex: 1
}
}
#loading {
position: absolute;
top:50%;
left:50%;
margin-top:-15px;
text-align: center;
.spinner {
display: block;
margin: 0 auto;
height:30px;
width:30px;
border-radius: 50%;
border:2px solid rgba(0,0,0,.2);
border-top-color:$color-accent;
animation: spin .5s linear infinite;
}
#status {
margin-top: 10px;
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($color-base,.5);
z-index:1000000;
.popup-title {
position: relative;
padding:15px;
background:$bg-button;
.closer {
position:absolute;
right:0px;
top:0;
padding:15px;
color:$color-text-fade;
cursor: pointer;
&:hover {
color:$color-text;
}
}
}
.popup-wrapper {
background:$color-fg;
height:100%;
width:100%;
max-width:600px;
margin:0 auto;
position: relative;
overflow: hidden;
border:1px solid $color-border;
.popup-content {
height:100%;
width:100%;
padding:10px;
overflow-y:scroll;
white-space: normal;
}
}
}
form {
label {
display: block;
padding-top:10px;
margin-bottom:10px;
}
.info {
color:$color-text-fade;
margin-bottom:10px;
}
input {
display:block;
margin-bottom:10px;
background:$color-bg;
font:inherit;
color:$color-text;
border:1px solid $color-border;
width:100%;
padding:10px;
&.invalid {
box-shadow: 0 0 0 1px rgba(red,.3)!important;
}
&:focus {
box-shadow: 0 0 0 1px $color-accent;
}
}
.submit {
margin-top:30px;
}
}
// WIDGETS
.widget {
display:inline-block;
height:100%;
overflow: visible;
position:relative;
font-size:13px;
// box-shadow: 0 0 0 1px $color-border;
padding-top:35px;
//padding-bottom: 8px;
vertical-align:top;
// overflow: hidden;
border: 10px solid $color-fg;
border-width:10px 5px 5px;
.label {
z-index: 1;
padding:10px 10px;
position:absolute;
top:0px;
left:0;
right:0;
text-overflow:ellipsis;
overflow:hidden;
height:35px;
//border-radius:2px 2px 0 0 ;
background:$bg-button;
box-shadow: 0 0 0 1px $color-bg inset;
&.accent {
color:$color-accent;
}
}
input {
width:100%;
height:35px;
border:0;
background:$color-bg;
color:inherit;
display:block;
padding:10px;
&:focus {
box-shadow:0 0 0 1px $color-accent inset!important;
}
&[disabled] {
color:$color-text-fade;
}
}
}
/* BUTTONS */
.toggle {
width:95px;
height:100%;
padding:10px 1px 0;
cursor: pointer;
div {
display: flex;
align-items: center;
justify-content: center;
height:100%;
text-align: center;
span {
white-space: nowrap;
text-overflow: ellipsis;
}
background:$bg-button;
box-shadow: 0 0 0 1px $color-bg inset;
color:$color-text-fade;
}
&.on div {
background:$bg-button-on;
color:$color-accent;
}
}
.stack .toggle {
float:right;
width:70%;
height:70px;
padding: 0 0 0 10px;
position: static;
}
.switch {
width:95px;
height:100%;
padding:10px 1px 0;
cursor: pointer;
display: flex;
flex-direction:column;
align-items: stretch;
.value {
background:$bg-button;
color:$color-text-fade;
display: flex;
align-items: center;
justify-content: center;
height:100%;
width:100%;
margin-bottom:2px;
box-shadow: 0 0 0 1px $color-bg inset;
span {
padding:10px;
white-space: normal;
word-break: break-all;
overflow: hidden;
}
&:last-child {
margin-bottom:0;
}
&.on {
background:$bg-button-on;
color:$color-accent;
}
}
}
.stack .switch {
float:right;
width:70%;
height:70px;
padding: 0 0 0 10px;
position: static;
flex-direction:row;
.value {
margin-bottom:0px;
margin-right:2px;
&:last-child {
margin-right:0;
}
}
}
/* STACK (contains any widgets) */
.stack {
width:400px;
height:auto;
padding-bottom:0;
border-bottom: 0;
}
.stack .widget {
width:100%;
display:block;
padding:0;
border-top:0;
border-right:0;
border-left:0;
margin-top: 10px;
&:after {
content:"";
display:block;
clear:both;
}
}
.stack .widget .label {
width:30%;
height:35px;
}
/* XY */
.xy-wrapper {
width:400px;
padding: 10px 0px 90px;
height:490px;
overflow: hidden;
.value {
margin-top:10px;
width:100%;
}
input {
width:50%;
float:left;
padding-left: 20px;
position: relative;
left:0px;
right:0px;
box-shadow: 0 0 1px 0 $color-border inset;
}
}
.xy {
position:relative;
width:100%;
height: 100%;
border:1px solid $color-border;
//background: $color-bg;
overflow: hidden;
.handle {
position:absolute;
height:0px;
width:0px;
bottom:0;
left:0;
max-height:100%;
max-width:100%;
z-index:2;
cursor: -webkit-grab;
&:active {
cursor: -webkit-grabbing;
&:after {
transform: scale(1.5);
}
}
&:after {
content:"";
position:absolute;
top:-.5px;
right:-1px;
//box-shadow:0 0 10px 0px #aaa inset,0 0 1px 1px rgba(0,0,0,.5),0 0 0 3px rgba(255,255,255,.2)!important;
border-radius:100%!important;
//background:$color-accent!important;
width: 20px;
height: 20px;
margin:-10px -10px 0 0;
box-shadow: 0 0 0 1000px rgba($color-base,.5), 0 0 0 1px rgba(white,.2);
}
&::before {
content:"";
position:absolute;
top:-.5px;
left:-1px;
width:2000px;
height:2000px;
margin:-1000px 0 0 -1000px;
}
}
}
.stack .xy-wrapper {
float:right;
width:70%;
height:300px;
padding-top:0;
padding-left:10px;
}
.rgb-wrapper {
height:530px;
padding-bottom: 130px;
input {
width:33.33%;
}
}
.rgb {
background-color: red;
&:before, &:after {
content:"";
position: absolute;
left:0;
top:0;
width: 100%;
height: 100%;
}
&:before {
background: linear-gradient(to right, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
}
&:after {
background: linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%); /* W3C */
}
.handle {
span {
//background: rgba($color-base,.35)
}
}
}
.hue {
width:100%;
height:30px;
border:1px solid $color-border;
margin-top:10px;
background:transparent linear-gradient(to left, #F00, #FF0080, #F0F, #8000FF, #00F, #0080FF, #0FF, #00FF80, #0F0, #80FF00, #FF0, #FF8000, #F00) repeat scroll 0% 0%;
overflow: hidden;
position: relative;
.handle {
position:absolute;
height:100%;
max-width: 100%;
width:0;
z-index:2;
left:0;
bottom:0;
cursor: -webkit-grab;
&:active {
cursor: -webkit-grabbing;
&:after {
transform: scale(1.5);
}
}
&:after {
content:"";
position:absolute;
top:50%;
right:-1px;
box-shadow: 0 0 0 1000px rgba($color-base,.5), 0 0 0 1px rgba(white,.2);
border-radius:100%!important;
width: 11px;
height: 11px;
margin:-5px -4px 0 0;
}
&:before {
content:"";
position:absolute;
top:0;
left:0;
width:2000px;
height:100%;
margin-left:-1000px;
}
}
}
.fader-wrapper-outer {
padding-bottom:30px;
overflow:hidden;
height:100%;
position: relative;
input {
position:absolute;
bottom:0;
box-shadow: 0 0 1px 0 $color-border inset;
}
}
.fader-wrapper {
padding:20px 15px 20px 20px ;
overflow:hidden;
height:100%;
width:95px;
position: relative;
.fader {
height:100%;
width:4px;
background:rgba($color-base,.4);
position: relative;
.handle {
position: absolute;
bottom:0!important;
top:auto!important;
width:100%;
height:0px;
max-height:100%;
max-width:100%;
cursor: -webkit-grab;
background:$color-accent;
z-index: 1;
&:after { //.ui-resizable-handle {
content:"";
position: absolute;
height:2000px;
width:2000px;
margin:-1000px 0 0 -1000px;
}
}
}
.pips {
position: absolute;
top:-1%;
bottom:1%;
left:14px;
}
.pip {
height:1%;
width:4px;
border-bottom:1px solid $color-text;
&.val {
width:10px;
position: relative;
span {
position: relative;
width:30px;
display: block;
text-align: center;
font-size:11px;
line-height: 12px;
left:15px;
top:-2px;
color:$color-text;
}
}
}
}
.stack .fader-wrapper-outer {
padding-bottom: 0;
input {
width:30%;
height:35px;
left:0;
right:auto;
border-top:0;
top:35px;
}
.fader {
width:100%;
height:4px;
.handle {
height:100%!important;
width:0;
}
}
.fader-wrapper-outer {
padding:0;
}
.fader-wrapper {
padding:20px 20px;
float:right;
width:70%;
height:70px;
}
.pips {
top:14px;left:0;
right:0;
display: flex;
flex-direction:row;
align-items: stretch;
}
.pip {
width:100%;
display: block;
height:4px;
border-bottom:0;
border-right:1px solid $color-text;
&.val {
width:1%;
float:left;
height:10px;
span {
top:15px;
left:-15px;
}
}
}
}
.knob-wrapper-outer {
padding-bottom:30px;
overflow:hidden;
width:100%;
position: relative;
input {
position:absolute;
bottom:0;
box-shadow: 0 0 1px 0 $color-border inset;
}
}
.knob-wrapper {
padding:20px 20px 20px 20px ;
overflow:hidden;
//height:100%;
width:120px;
position: relative;
.knob {
width:100%;
padding-bottom:100%;
border-radius:100%;
position: relative;
background: $color-bg;
box-shadow: 0 0 0 2px $color-border;
cursor: -webkit-grab;
&:active {
cursor: -webkit-grabbing;
}
&:after {
content:"";
position:absolute;
width:4px;
height:4px;
border-radius:100%;
left:50%;
margin-left:-3px;
bottom:4px;
border:1px solid $color-border;
background:$color-accent
}
}
.pip {
position:absolute;
font-size:11px;
color:$color-text;
&.min {
bottom:10px;
right:50%;
margin-right:35px;
text-align:right;
}
&.max {
bottom:10px;
left:50%;
margin-left:35px;
text-align:left;
}
}
}