ui: tweaks

This commit is contained in:
cha0s 2021-01-30 18:54:41 -06:00
parent 73da7d52ae
commit c26f6a4bb3
4 changed files with 54 additions and 16 deletions

View File

@ -2,7 +2,6 @@
align-items: center; align-items: center;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
margin-right: 1em;
button, .button { button, .button {
color: #00bdd6; color: #00bdd6;
} }
@ -14,6 +13,7 @@
} }
.expression__invocation-toggle { .expression__invocation-toggle {
margin: 0;
padding: 0.25em; padding: 0.25em;
pointer-events: auto; pointer-events: auto;
&.to { &.to {

View File

@ -29,7 +29,7 @@ const Invocation = ({
}; };
return ( return (
<div className="invocation"> <div className="invocation">
( <div className="invocation__args-wrapper">
{ {
op.args.map((arg, i) => ( op.args.map((arg, i) => (
<div <div
@ -37,11 +37,10 @@ const Invocation = ({
className="invocation__arg" className="invocation__arg"
> >
{argComponent(arg, i)} {argComponent(arg, i)}
{i < op.args.length - 1 && <span className="invocation__arg-sep">, </span>}
</div> </div>
)) ))
} }
) </div>
</div> </div>
); );
}; };

View File

@ -1,16 +1,53 @@
.invocation { .invocation {
align-items: center; align-items: center;
background-color: rgba(0, 0, 0, 0.1);
display: flex; display: flex;
flex-wrap: wrap; // flex-basis: 100%;
// flex-wrap: wrap;
// margin: 0.5em 0 0 1em;
margin-left: 1em; margin-left: 1em;
> .expression { > .expression {
margin: 0 0.5em; margin: 0 0.5em;
} }
&:after {
color: #00bdd6;
content: ')';
}
&:before {
color: #00bdd6;
content: '(';
}
}
.invocation__args-wrapper {
display: flex;
flex-direction: row;
flex-wrap: wrap;
margin: 0.25em;
} }
.invocation__arg { .invocation__arg {
align-items: center; align-items: center;
background-color: rgba(255, 255, 255, 0.1);
display: flex; display: flex;
// margin-bottom: 0.5em;
padding: 0.5em;
position: relative;
&:nth-of-type(2n+1) {
background-color: rgba(0, 0, 0, 0.1);
}
&:after {
content: ',';
position: absolute;
bottom: 0;
right: 0;
}
&:last-of-type {
// margin-bottom: 0;
&::after {
content: '';
}
}
} }
.invocation__arg-sep { .invocation__arg-sep {

View File

@ -30,7 +30,8 @@
margin-top: 0.5em; margin-top: 0.5em;
} }
.expressions > .expression { .expressions__expression-wrapper > .expression {
margin-right: 1em;
padding: 0.5em; padding: 0.5em;
} }
@ -45,6 +46,7 @@
} }
.expressions__add-expression { .expressions__add-expression {
font-size: 0.8em;
margin-left: 0.5em; margin-left: 0.5em;
pointer-events: auto; pointer-events: auto;
} }