widgets: expose stroke width (wip)

This commit is contained in:
bordun 2020-09-06 15:41:56 +02:00
parent 7fb857e670
commit 3041c4e9e3
15 changed files with 67 additions and 50 deletions

View file

@ -2,7 +2,7 @@
&:before {
content:"";
position: absolute;
border: 1rem solid var(--color-stroke);
border: var(--stroke-width) solid var(--color-stroke);
opacity: var(--alpha-stroke);
top: 0;
left: 0;
@ -20,10 +20,10 @@
position: absolute;
background: var(--color-fill);
opacity: var(--alpha-fill);
top: 1rem;
left: 1rem;
right: 1rem;
bottom: 1rem;
top: var(--stroke-width);
left: var(--stroke-width);
right: var(--stroke-width);
bottom: var(--stroke-width);
pointer-events: none;
margin: var(--widget-padding);
z-index: $z;

View file

@ -29,6 +29,8 @@ $font-menu: sans-serif;
--color-context-menu-text: #{$nord1};
--stroke-width: 1rem;
--alpha-scrollbar: 0.25;
--alpha-scrollbar-on: 0.75;
--scrollbar-size: 12rem;

View file

@ -23,6 +23,7 @@
// transform-origin: top left;
--stroke-width: 1rem;
--widget-padding: 1rem;
--color-stroke:var(--color-widget);

View file

@ -88,7 +88,7 @@
display: flex;
flex-direction: column;
--widget-spacing: calc(var(--widget-padding) / 2);
margin: calc(var(--widget-spacing) + 1rem);
margin: calc(var(--widget-spacing) + var(--stroke-width));
}
@ -125,6 +125,7 @@
overflow: hidden;
@include pseudo-fill($z: -1);
&:after {
--stroke-width: 1rem;
margin: calc(var(--widget-spacing) - 1rem);
}

View file

@ -188,7 +188,7 @@
&.contains-widgets {
> inner {
margin: calc(var(--widget-spacing) + 1rem);
margin: calc(var(--widget-spacing) + var(--stroke-width));
}
&.no-inner-padding > inner {
@ -533,6 +533,7 @@
.patchbaynode-container {
justify-content: center;
background: transparent;
}
.patchbay-container {
@ -555,21 +556,23 @@
display: flex;
flex-direction: column;
align-items:stretch;
margin-bottom: 1rem;
margin-bottom: var(--stroke-width);
width: 25%;
}
.inputs, .outputs {
position: relative;
@include pseudo-stroke();
top: 1rem;
top: var(--stroke-width);
margin-top: -1rem;
height: calc(100% - var(--stroke-width) * 2 + 2rem);
}
.inputs:before {
border-width: 0 1rem 0 0;
border-width: 0 var(--stroke-width) 0 0;
}
.outputs:before {
border-width: 0 0 0 1rem;
border-width: 0 0 0 var(--stroke-width);
}
}

View file

@ -52,7 +52,7 @@
--widget-spacing: calc(var(--widget-padding) / 2);
padding: var(--widget-spacing);
padding: calc(var(--stroke-width) + var(--widget-spacing));
grid-template:
"a a b" auto / 1fr;
@ -70,6 +70,7 @@
width: auto;
margin: var(--widget-spacing);
--widget-padding: 2rem;
--stroke-width: 0;
}
.pad {
@ -98,7 +99,7 @@
--alpha-fill-off: 0.5;
--alpha-fill-on: 0;
--alpha-stroke: 0;
--widget-padding: -1rem;
--widget-padding: 0rem;
&:after {
content:"";
@ -120,7 +121,7 @@
--alpha-stroke: 0;
--alpha-fill-off: 0.1;
--alpha-fill-on: 0.25;
--widget-padding: -1rem;
--widget-padding: 0rem;
}
}