style: fixed sidebar border issue
Signed-off-by: mellobacon <mellodev@outlook.com>
mellobacon committed
Nov 8, 2023 at 03:45 UTC
678fbd2e0ed90c2ca60338a59e3d46c9e1eb8960
2 files changed
+3
-22
src/lib/Tab/TabList.svelte
+1
-19
@@ -1,13 +1,10 @@
1
<script lang="ts">
2
- import { afterUpdate, onMount } from "svelte";
2
+ import { onMount } from "svelte";
3
import Tab from "./Tab.svelte";
4
import Sortable from 'sortablejs';
5
- import { showsidebarview } from "../Sidebar.svelte";
6
- import { getThemeProperty } from "../../config/themehandler";
5
import { type Writable } from "svelte/store";
6
7
export let tabs: Writable<any[]>;
10
- export let addTab = false;
8
export let width = "unset";
9
10
let tabcontainer = null;
@@ -22,21 +19,6 @@
19
sort: true
20
})
21
})
25
-
26
- afterUpdate(() => {
27
- // css trick to take care of the tabs overlapping the sidebar border for some reason
28
- if (!$showsidebarview) {
29
- tabcontainer.style.borderLeft = `1px solid ${getThemeProperty("window-borderColor")}`;
30
- }
31
- else {
32
- tabcontainer.style.borderLeft = "";
33
- }
34
-
35
- if (addTab) {
36
- console.log("will add tab")
37
- addTab = false;
38
- }
39
- })
22
</script>
23
<div bind:this={tabcontainer} id="tablist" style="max-width: {width}">
24
{#each $tabs as tab}
src/theme.scss
+2
-3
@@ -129,7 +129,7 @@ button:focus {
129
}
130
131
#sidebar {
132
- box-shadow: 1px 0px 0 0 var(--window-borderColor);
132
+ border-right: 1px solid var(--window-borderColor);
133
}
134
135
.sidebar-tab {
@@ -194,8 +194,7 @@ button:focus {
194
}
195
196
#tabview {
197
- margin-top: calc(5px);
198
- height: calc(100% - 6.4rem);
197
+ height: calc(100% - 2.3rem);
198
}
199
200
.cm-content {