Skip to content

Commit d5f28a3

Browse files
committed
Fixed SuperDebug collapsed height.
1 parent a0892d6 commit d5f28a3

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Fixed
1111

1212
- Fixed types for constraints, tainted and errors when using intersections and unions in schemas.
13+
- Fixed SuperDebug collapsed height by preventing global css leak.
1314

1415
## [2.8.1] - 2024-03-07
1516

src/lib/client/SuperDebug.svelte

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -478,8 +478,9 @@
478478
</div>
479479
</div>
480480
<pre
481-
class="super-debug--pre {collapsed && label === '' ? 'h-4' : ''}"
482-
class:hidden={collapsed}
481+
class="super-debug--pre"
482+
class:super-debug--with-label={label}
483+
class:super-debug--hidden={collapsed}
483484
bind:this={ref}><code class="super-debug--code"
484485
><slot
485486
>{#if assertPromise($debugData, raw, promise)}{#await $debugData}<div
@@ -552,21 +553,13 @@
552553
right: 0px;
553554
}
554555
555-
.pt-0 {
556-
padding-top: 0px;
557-
}
558-
559-
.pt-4 {
560-
padding-top: 1em;
561-
}
562-
563-
.hidden {
556+
.super-debug--hidden {
564557
height: 0;
565558
overflow: hidden;
566559
}
567560
568-
.hidden.h-4 {
569-
height: 1.25em;
561+
.super-debug--hidden:not(.super-debug--with-label) {
562+
height: 1.5em;
570563
}
571564
572565
.rotated {

src/routes/(v1)/super-debug/+page.svelte

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,4 +223,8 @@
223223
:global(.space-y-4 > * + *) {
224224
margin-top: 1rem;
225225
}
226+
227+
:global(.hidden) {
228+
display: none;
229+
}
226230
</style>

0 commit comments

Comments
 (0)