Skip to content

Commit 40f0b36

Browse files
authored
Enhancement: Updated styling for scrollbars (#292)
* Updated styling for scrollbars * Proper alignment of fullscreen button * Fixed button alignment * Set wide scrollbar to body
1 parent ba8b2f1 commit 40f0b36

6 files changed

Lines changed: 42 additions & 3 deletions

File tree

assets/css/app.css

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,34 @@
77
@import 'tailwindcss/utilities';
88

99
/* You can add custom styles here */
10+
11+
::-webkit-scrollbar {
12+
width: 6px;
13+
height: 6px;
14+
background: transparent;
15+
}
16+
17+
.scrollbar-main::-webkit-scrollbar {
18+
width: 8px;
19+
height: 8px;
20+
background: transparent;
21+
}
22+
23+
body::-webkit-scrollbar {
24+
width: 8px;
25+
height: 8px;
26+
background: transparent;
27+
}
28+
29+
::-webkit-scrollbar-thumb {
30+
background: var(--scrollbar-thumb);
31+
border-radius: 8px;
32+
}
33+
34+
::-webkit-scrollbar-thumb:hover {
35+
background: var(--scrollbar-thumb-hover);
36+
}
37+
38+
::-webkit-scrollbar-corner {
39+
background: transparent;
40+
}

assets/css/themes/dark.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
--ui-muted: var(--gray-600);
1919
--ui-accent: var(--swm-sea-blue-60);
2020

21+
/* Scrollbar */
22+
--scrollbar-thumb: var(--gray-600);
23+
--scrollbar-thumb-hover: var(--gray-500);
24+
2125
/* Navbar */
2226
--navbar-bg: var(--gray-900);
2327
--navbar-border: var(--gray-700);

assets/css/themes/light.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
--ui-muted: var(--slate-300);
1919
--ui-accent: var(--swm-brand);
2020

21+
/* Scrollbar */
22+
--scrollbar-thumb: var(--slate-300);
23+
--scrollbar-thumb-hover: var(--slate-400);
24+
2125
/* Navbar */
2226
--navbar-bg: var(--neutrals-white);
2327
--navbar-border: var(--slate-200);

lib/live_debugger/components.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ defmodule LiveDebugger.Components do
237237
</div>
238238
</div>
239239
<div class={[
240-
"flex flex-1 overflow-auto rounded-sm bg-surface-0-bg m-2" | List.wrap(@inner_class)
240+
"flex flex-1 overflow-auto rounded-sm bg-surface-0-bg" | List.wrap(@inner_class)
241241
]}>
242242
<%= render_slot(@inner_block) %>
243243
</div>

lib/live_debugger/components/traces.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ defmodule LiveDebugger.Components.Traces do
9494
</div>
9595
</:label>
9696
<div class="relative">
97-
<div class="absolute right-[17px] top-0 z-10">
97+
<div class="absolute right-0 top-0 z-10">
9898
<.fullscreen_button
9999
id={"trace-fullscreen-#{@id}"}
100100
class="m-2"

lib/live_debugger/live_views/channel_dashboard_live.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ defmodule LiveDebugger.LiveViews.ChannelDashboardLive do
7171
node_id={@node_id || lv_process.pid}
7272
/>
7373
74-
<div class="flex grow flex-col xl:flex-row gap-4 xl:gap-8 p-8 overflow-y-auto xl:overflow-y-hidden max-w-screen-2xl mx-auto">
74+
<div class="flex grow flex-col xl:flex-row gap-4 xl:gap-8 p-8 overflow-y-auto xl:overflow-y-hidden max-w-screen-2xl mx-auto scrollbar-main">
7575
<div class="xl:w-1/2">
7676
<StateLive.live_render
7777
id="node-state-lv"

0 commit comments

Comments
 (0)