diff --git a/src/client/index.scss b/src/client/index.scss index f1fa97e..1f3d2e2 100644 --- a/src/client/index.scss +++ b/src/client/index.scss @@ -133,7 +133,6 @@ select { color: #ffffff; cursor: pointer; font-size: 0.75em; - margin: 0; -moz-appearance: none; -webkit-appearance: none; padding: 0.5em; diff --git a/src/client/types/condition.raw.scss b/src/client/types/condition.raw.scss index 04c510d..53a3669 100644 --- a/src/client/types/condition.raw.scss +++ b/src/client/types/condition.raw.scss @@ -6,7 +6,7 @@ } .operator { - margin: 0; + margin: 0 0 0.125em 0; text-align: center; text-align-last: center; } diff --git a/src/client/types/expression.raw.scss b/src/client/types/expression.raw.scss index 69de48e..b9bb800 100644 --- a/src/client/types/expression.raw.scss +++ b/src/client/types/expression.raw.scss @@ -6,11 +6,11 @@ .label { color: #999; - font-size: 0.8em; - left: -2.5em; + font-size: 0.6em; + left: -1.25em; position: absolute; writing-mode: vertical-lr; - top: -1em; + top: 0.125em; } .key { @@ -24,16 +24,18 @@ } .args { - margin-left: 2em; + display: flex; + flex-wrap: wrap; } .arg { border: 1px solid rgba(255, 255, 255, 0.1); display: flex; margin-left: 1.5em; - padding: 0.5em; - &:not(:last-of-type) { - border-bottom: none; + margin-bottom: 0.125em; + padding: 0.125em 0.125em 0.125em 0; + &:last-of-type { + margin-bottom: 0; } &:nth-of-type(2n) { background-color: rgba(0, 0, 0, 0.025); @@ -44,13 +46,25 @@ } .arg label { - padding: 0; + min-height: auto; + padding: 0.0125em 0 0; + position: relative; + > .text { + position: absolute; + top: -0.75em; + font-size: 0.7em; + z-index: 2; + } } .arg .expression { display: flex; } +.arg .op { + margin: 0 0 0 0.125em; +} + .paren { color: #999999; line-height: 1.75em; @@ -59,11 +73,15 @@ .invoke { display: flex; flex-direction: column; + &.empty { + flex-direction: row; + } } .assign { display: flex; align-items: center; + margin: 0.125em; } .eql { @@ -74,8 +92,5 @@ .op { align-self: flex-start; - margin-right: 0.125em; - &:last-of-type { - margin-right: 0; - } + margin: 0.125em 0 0.125em 0.125em; } diff --git a/src/client/types/expression.type-renderer.jsx b/src/client/types/expression.type-renderer.jsx index ec16cdf..3389d4e 100644 --- a/src/client/types/expression.type-renderer.jsx +++ b/src/client/types/expression.type-renderer.jsx @@ -4,6 +4,7 @@ import { description as typeDescription, } from '@avocado/behavior'; import {compose} from '@avocado/core'; +import classnames from 'classnames'; import contempo from 'contempo'; import React from 'react'; @@ -104,45 +105,55 @@ const Expression = (props) => { case 'invoke': { const description = descriptionFromOps(context, ops.slice(0, i + 1)); const args = description.args || []; - const argSpecs = Object.values(args).map(([, argSpec]) => argSpec); + const argSpecs = Object.values(args).map(([name, argSpec]) => ({ + ...argSpec, + name, + })); return ( -