Skip to content

Commit 03d122f

Browse files
authored
Merge pull request #2 from Rich-Harris/inline
make root display: inline by default
2 parents 98de2dd + 7c0d50f commit 03d122f

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/lib/svelte-json-tree/SvelteJsonTree/Root.svelte

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
});
2828
</script>
2929

30-
<div class:expandable>
30+
<span class:expandable>
3131
{#if expandable}
3232
<Expandable key="$" {expanded}>
3333
<JSONNode {value} />
@@ -37,10 +37,10 @@
3737
{:else}
3838
<JSONNode {value} />
3939
{/if}
40-
</div>
40+
</span>
4141

4242
<style>
43-
div {
43+
span {
4444
--string-color: var(--json-tree-string-color, #cb3f41);
4545
--symbol-color: var(--json-tree-symbol-color, #cb3f41);
4646
--boolean-color: var(--json-tree-boolean-color, #112aa7);
@@ -60,36 +60,36 @@
6060
font-size: var(--json-tree-font-size, 12px);
6161
font-family: var(--json-tree-font-family, 'Courier New', Courier, monospace);
6262
}
63-
div :global(li) {
63+
span :global(li) {
6464
line-height: var(--li-line-height);
6565
display: var(--li-display, list-item);
6666
list-style: none;
6767
}
68-
div,
69-
div :global(ul) {
68+
span,
69+
span :global(ul) {
7070
padding: 0;
7171
margin: 0;
7272
}
7373
7474
.expandable {
7575
margin-left: var(--li-identation);
7676
}
77-
div {
77+
span {
7878
cursor: default;
7979
}
80-
div :global(.label) {
80+
span :global(.label) {
8181
color: var(--label-color);
8282
}
83-
div :global(.property) {
83+
span :global(.property) {
8484
color: var(--property-color);
8585
}
86-
div :global(.internal) {
86+
span :global(.internal) {
8787
color: var(--internal-color);
8888
}
89-
div :global(.operator) {
89+
span :global(.operator) {
9090
color: var(--operator-color);
9191
}
92-
span {
92+
span > span {
9393
white-space: pre-wrap;
9494
}
9595
</style>

0 commit comments

Comments
 (0)