Skip to content

Commit

Permalink
Improve flex
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrl-escp committed Jun 8, 2024
1 parent ec34b47 commit 0545213
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,6 @@ nav {
flex-direction: column;
height: calc(95vh - var(--nav-height));
gap: .2rem;
width: 100%;
}
</style>
27 changes: 18 additions & 9 deletions src/components/NodesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,20 @@ onMounted(() => {
title="Parent node type">{{ node.parentNode ? node.parentNode.type + '=>' : '' }}</span>{{ node.type }}]
</span>
<span class="node-src"
title="Click to show node in code">{{ node.src?.substring ? node.src.substring(0, 100) : 'N/A' }}</span>
title="Click to show node in code">{{ node.src?.substring ? node.src.substring(0, 200) : 'N/A' }}</span>
</div>
</fieldset>
</template>

<style scoped>
.ast-list-wrapper {
display: flex;
flex: 1;
padding: 5px;
width: 100%;
flex-direction: column;
height: 50vh;
overflow: auto;
padding: 0 5px;
overflow-x: hidden;
overflow-y: auto;
}
.prev-page, .next-page {
Expand All @@ -95,11 +97,11 @@ legend {
}
.node-container {
margin: 5px 0;
}
.node-container > * {
margin-right: 2px;
display: flex;
margin: 2px 0;
white-space: nowrap;
text-overflow: ellipsis;
gap: .5rem;
}
.node-parent-type {
Expand All @@ -108,6 +110,13 @@ legend {
font-size: x-small;
}
.node-src {
max-width: calc(50vw - 20rem);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.node-type {
color: #41e804;
}
Expand Down

0 comments on commit 0545213

Please sign in to comment.