Skip to content

Visualize Your Ideas With Code

fix: make panes scrollable (#14)

Jacobdc9fd380285c
diff --git a/src/components/controls/Controls.module.scss b/src/components/controls/Controls.module.scss
index 23ea3692..38655932 100644
--- a/src/components/controls/Controls.module.scss
+++ b/src/components/controls/Controls.module.scss
@@ -131,8 +131,12 @@
}
.value {
+ overflow: hidden;
+ text-overflow: ellipsis;
+
&::before {
content: attr(data-value);
+ white-space: nowrap;
}
&[data-full]:hover::before {
diff --git a/src/components/sidebar/Properties.tsx b/src/components/sidebar/Properties.tsx
index 19842ef3..c52c5fc3 100644
--- a/src/components/sidebar/Properties.tsx
+++ b/src/components/sidebar/Properties.tsx
@@ -67,6 +67,11 @@ function YesNodeSelected({node}: {node: Node}) {
})`;
}
+ // Temporary padding and margin support
+ if (typeof value === 'object' && 'left' in value) {
+ value = `${value.top}, ${value.right}, ${value.bottom}, ${value.left}`;
+ }
+
return (
<Group>
<Label>{key}</Label>
diff --git a/src/components/sidebar/Sidebar.module.scss b/src/components/sidebar/Sidebar.module.scss
index 8e0447bc..d7e755f2 100644
--- a/src/components/sidebar/Sidebar.module.scss
+++ b/src/components/sidebar/Sidebar.module.scss
@@ -6,6 +6,7 @@
width: 100%;
height: 100%;
padding: 16px;
+ overflow-y: scroll;
}
.header {
diff --git a/src/components/timeline/Timeline.module.scss b/src/components/timeline/Timeline.module.scss
index 7e911b21..91d4aa0c 100644
--- a/src/components/timeline/Timeline.module.scss
+++ b/src/components/timeline/Timeline.module.scss
@@ -16,21 +16,9 @@
.timeline {
overflow-x: auto;
- overflow-y: auto;
+ overflow-y: hidden;
flex-grow: 1;
position: relative;
-
- &::-webkit-scrollbar {
- width: 16px;
- height: 16px;
- background-color: #242424;
- }
-
- &::-webkit-scrollbar-thumb {
- background: rgba(255, 255, 255, 0.24);
- border: 6px solid #242424;
- border-radius: 8px;
- }
}
.track {
@@ -247,4 +235,4 @@
.audioTrack {
opacity: 0.16;
margin: 24px 0;
-}
\ No newline at end of file
+}
diff --git a/src/index.scss b/src/index.scss
index 291d4e04..14fec122 100644
--- a/src/index.scss
+++ b/src/index.scss
@@ -5,7 +5,19 @@
* {
box-sizing: border-box;
- font-family: "JetBrains Mono", sans-serif;
+ font-family: 'JetBrains Mono', sans-serif;
+
+ &::-webkit-scrollbar {
+ width: 16px;
+ height: 16px;
+ background-color: #242424;
+ }
+
+ &::-webkit-scrollbar-thumb {
+ background: rgba(255, 255, 255, 0.24);
+ border: 6px solid #242424;
+ border-radius: 8px;
+ }
}
html,
@@ -20,4 +32,4 @@ body {
main {
width: 100vw;
height: 100vh;
-}
\ No newline at end of file
+}