don't use <hr> for horizontal lines between elements + better looking shadows
This commit is contained in:
parent
431e542791
commit
7045513c0d
4 changed files with 40 additions and 21 deletions
|
|
@ -83,15 +83,17 @@ button.inputEvent:active:not(:disabled) {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
hr {
|
/* hr {
|
||||||
display: block;
|
display: block;
|
||||||
height: 1px;
|
height: 1px;
|
||||||
border: 0;
|
border: 0;
|
||||||
border-top: 1px solid #ccc;
|
border-top: 1px solid #ccc;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
margin-bottom: -1px;
|
margin-top: -1px;
|
||||||
|
margin-bottom: -5px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
z-index: -1;
|
||||||
|
} */
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
list-style-type: circle;
|
list-style-type: circle;
|
||||||
|
|
@ -101,7 +103,7 @@ ul {
|
||||||
/* list-style-position: ; */
|
/* list-style-position: ; */
|
||||||
}
|
}
|
||||||
|
|
||||||
.onTop {
|
.shadowBelow {
|
||||||
box-shadow: 0 -10px 20px 10px rgba(0, 0, 0, 0.75);
|
box-shadow: 0 -15px 15px 15px rgba(0, 0, 0, 0.4);
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
@ -5,12 +5,23 @@ summary {
|
||||||
margin-left: -20;
|
margin-left: -20;
|
||||||
} */
|
} */
|
||||||
|
|
||||||
|
details:has(+ details) {
|
||||||
|
border-bottom: 1px lightgrey solid;
|
||||||
|
}
|
||||||
|
|
||||||
.runtimeState {
|
.runtimeState {
|
||||||
padding-left: 4px;
|
padding: 4px;
|
||||||
|
/* padding-left: 4px;
|
||||||
padding-right: 4px;
|
padding-right: 4px;
|
||||||
padding-top: 2px;
|
padding-top: 2px;
|
||||||
padding-bottom: 2px;
|
padding-bottom: 2px; */
|
||||||
margin-top: 2px;
|
}
|
||||||
|
|
||||||
|
.runtimeState:has(+.runtimeState) {
|
||||||
|
border-bottom: 1px lightgrey solid;
|
||||||
|
}
|
||||||
|
.runtimeState:has(+.runtimeState.active) {
|
||||||
|
border-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.runtimeState:hover {
|
.runtimeState:hover {
|
||||||
|
|
@ -22,7 +33,7 @@ summary {
|
||||||
/* background-color: rgba(255, 140, 0, 0.2); */
|
/* background-color: rgba(255, 140, 0, 0.2); */
|
||||||
background-color: rgba(0,0,255,0.2);
|
background-color: rgba(0,0,255,0.2);
|
||||||
/* border: solid black 3px; */
|
/* border: solid black 3px; */
|
||||||
border: solid blue 2px;
|
border: solid blue 1px;
|
||||||
}
|
}
|
||||||
/* details:not(:has(details)) > summary::marker {
|
/* details:not(:has(details)) > summary::marker {
|
||||||
color: white;
|
color: white;
|
||||||
|
|
|
||||||
|
|
@ -212,13 +212,16 @@ export function App() {
|
||||||
<Box sx={{flexGrow:1, overflow: "auto"}}>
|
<Box sx={{flexGrow:1, overflow: "auto"}}>
|
||||||
<Stack sx={{height:'100%'}}>
|
<Stack sx={{height:'100%'}}>
|
||||||
{/* Top bar */}
|
{/* Top bar */}
|
||||||
<Box sx={{
|
<Box
|
||||||
display: "flex",
|
className="shadowBelow"
|
||||||
borderBottom: 1,
|
sx={{
|
||||||
borderColor: "divider",
|
display: "flex",
|
||||||
alignItems: 'center',
|
borderBottom: 1,
|
||||||
flex: '0 0 content',
|
borderColor: "divider",
|
||||||
}}>
|
alignItems: 'center',
|
||||||
|
flex: '0 0 content',
|
||||||
|
}}
|
||||||
|
>
|
||||||
<TopPanel
|
<TopPanel
|
||||||
rt={rtIdx === undefined ? undefined : rt[rtIdx]}
|
rt={rtIdx === undefined ? undefined : rt[rtIdx]}
|
||||||
{...{rtIdx, ast, time, setTime, onUndo, onRedo, onInit, onClear, onRaise, onBack, mode, setMode, setModal}}
|
{...{rtIdx, ast, time, setTime, onUndo, onRedo, onInit, onClear, onRaise, onBack, mode, setMode, setModal}}
|
||||||
|
|
@ -241,19 +244,20 @@ export function App() {
|
||||||
maxWidth: 'min(300px, 30vw)',
|
maxWidth: 'min(300px, 30vw)',
|
||||||
}}>
|
}}>
|
||||||
<Stack sx={{height:'100%'}}>
|
<Stack sx={{height:'100%'}}>
|
||||||
<Box className="onTop" sx={{flex: '0 0 content', backgroundColor: ''}}>
|
<Box
|
||||||
|
className="shadowBelow"
|
||||||
|
sx={{flex: '0 0 content', backgroundColor: ''}}
|
||||||
|
>
|
||||||
<PersistentDetails localStorageKey="showStateTree" initiallyOpen={true}>
|
<PersistentDetails localStorageKey="showStateTree" initiallyOpen={true}>
|
||||||
<summary>state tree</summary>
|
<summary>state tree</summary>
|
||||||
<ul>
|
<ul>
|
||||||
<ShowAST {...{...ast, rt: rt.at(rtIdx!), highlightActive}}/>
|
<ShowAST {...{...ast, rt: rt.at(rtIdx!), highlightActive}}/>
|
||||||
</ul>
|
</ul>
|
||||||
</PersistentDetails>
|
</PersistentDetails>
|
||||||
<hr/>
|
|
||||||
<PersistentDetails localStorageKey="showInputEvents" initiallyOpen={true}>
|
<PersistentDetails localStorageKey="showInputEvents" initiallyOpen={true}>
|
||||||
<summary>input events</summary>
|
<summary>input events</summary>
|
||||||
<ShowInputEvents inputEvents={ast.inputEvents} onRaise={onRaise} disabled={rtIdx===undefined}/>
|
<ShowInputEvents inputEvents={ast.inputEvents} onRaise={onRaise} disabled={rtIdx===undefined}/>
|
||||||
</PersistentDetails>
|
</PersistentDetails>
|
||||||
<hr/>
|
|
||||||
<PersistentDetails localStorageKey="showOutputEvents" initiallyOpen={true}>
|
<PersistentDetails localStorageKey="showOutputEvents" initiallyOpen={true}>
|
||||||
<summary>output events</summary>
|
<summary>output events</summary>
|
||||||
<ShowOutputEvents outputEvents={ast.outputEvents}/>
|
<ShowOutputEvents outputEvents={ast.outputEvents}/>
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,9 @@ export function RTHistory({rt, rtIdx, ast, setRTIdx, setTime, refRightSideBar}:
|
||||||
|
|
||||||
return <div>
|
return <div>
|
||||||
{rt.map((r, idx) => <>
|
{rt.map((r, idx) => <>
|
||||||
<hr/>
|
<div
|
||||||
<div className={"runtimeState"+(idx===rtIdx?" active":"")} onClick={() => gotoRt(idx, r.simtime)}>
|
className={"runtimeState"+(idx===rtIdx?" active":"")}
|
||||||
|
onClick={() => gotoRt(idx, r.simtime)}>
|
||||||
<div>
|
<div>
|
||||||
{formatTime(r.simtime)}
|
{formatTime(r.simtime)}
|
||||||
 
|
 
|
||||||
|
|
@ -33,6 +34,7 @@ export function RTHistory({rt, rtIdx, ast, setRTIdx, setTime, refRightSideBar}:
|
||||||
{r.outputEvents.length>0 && <>^
|
{r.outputEvents.length>0 && <>^
|
||||||
{r.outputEvents.map((e:RaisedEvent) => <span className="outputEvent">{e.name}</span>)}
|
{r.outputEvents.map((e:RaisedEvent) => <span className="outputEvent">{e.name}</span>)}
|
||||||
</>}
|
</>}
|
||||||
|
{/* <hr/> */}
|
||||||
</div></>)}
|
</div></>)}
|
||||||
</div>;
|
</div>;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue