Skip to content

Commit aeef565

Browse files
feat: tweak env display
1 parent 0e6f989 commit aeef565

File tree

1 file changed

+31
-19
lines changed

1 file changed

+31
-19
lines changed

website/src/components/EnvDisplay.vue

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -41,25 +41,25 @@ async function copyJson() {
4141
<template>
4242
<div class="var-debugger">
4343
<template v-if="currentEnv">
44-
<table class="metavar-table">
45-
<thead>
46-
<tr>
47-
<td>MetaVar Name</td>
48-
<td>Matched Node(s)</td>
49-
</tr>
50-
</thead>
51-
<tbody v-if="currentEnv">
52-
<tr v-for="(val, key) in currentEnv">
53-
<td>{{key}}</td>
54-
<td>
55-
<code>
56-
{{val.text}}
57-
</code>
58-
</td>
59-
</tr>
60-
</tbody>
61-
</table>
62-
<div>
44+
<div class="metavar-table-container">
45+
<table class="metavar-table">
46+
<thead>
47+
<tr>
48+
<td>MetaVar Name</td>
49+
<td>Matched Node(s)</td>
50+
</tr>
51+
</thead>
52+
<tbody v-if="currentEnv">
53+
<tr v-for="(val, key) in currentEnv">
54+
<td>{{key}}</td>
55+
<td>
56+
<code>{{val.text}}</code>
57+
</td>
58+
</tr>
59+
</tbody>
60+
</table>
61+
</div>
62+
<div class="metavar-action">
6363
<div class="choose-match-division" />
6464
<button @click="decrement">❮</button>
6565
<span class="match-count">{{ currentIndex + 1 }}/{{props.envs.length}} match(es)</span>
@@ -88,6 +88,18 @@ async function copyJson() {
8888
</template>
8989

9090
<style scoped>
91+
.var-debugger {
92+
display: flex;
93+
flex-direction: column;
94+
height: 100%;
95+
}
96+
.metavar-table-container {
97+
/* tweak padding/margin for scrolling shadow */
98+
margin-top: -1em;
99+
padding: 1em;
100+
flex: 1 0 0;
101+
overflow: auto;
102+
}
91103
.metavar-table {
92104
width: 100%;
93105
table-layout: fixed;

0 commit comments

Comments
 (0)