🐛 Fix visual problems on inspect panel

This commit is contained in:
alonso.torres 2024-01-08 15:51:28 +01:00
parent 5ea414aed6
commit 9007371ab5
3 changed files with 9 additions and 4 deletions

View file

@ -240,7 +240,8 @@
[:button.download-button {:on-click handle-open-review} [:button.download-button {:on-click handle-open-review}
"Preview"]] "Preview"]]
[:div {:class (stl/css :code-block)} [:div {:class (stl/css-case :code-block true
:collapsed collapsed-css?)}
[:div {:class (stl/css :code-row-lang)} [:div {:class (stl/css :code-row-lang)}
[:button {:class (stl/css :toggle-btn) [:button {:class (stl/css :toggle-btn)
:data-type "css" :data-type "css"
@ -274,7 +275,8 @@
:on-lost-pointer-capture on-style-lost-pointer-capture :on-lost-pointer-capture on-style-lost-pointer-capture
:on-pointer-move on-style-pointer-move}]] :on-pointer-move on-style-pointer-move}]]
[:div {:class (stl/css :code-block)} [:div {:class (stl/css-case :code-block true
:collapsed collapsed-markup?)}
[:div {:class (stl/css :code-row-lang)} [:div {:class (stl/css :code-row-lang)}
[:button {:class (stl/css :toggle-btn) [:button {:class (stl/css :toggle-btn)
:data-type "markup" :data-type "markup"

View file

@ -26,7 +26,6 @@
@include codeTypography; @include codeTypography;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
flex: 1;
height: 100%; height: 100%;
min-height: 0; min-height: 0;
overflow: hidden; overflow: hidden;
@ -35,7 +34,6 @@
pre { pre {
border-radius: $br-8; border-radius: $br-8;
padding: $s-16; padding: $s-16;
max-height: var(--code-height);
overflow: auto; overflow: auto;
height: 100%; height: 100%;
} }
@ -44,6 +42,10 @@
:global(.hljs) { :global(.hljs) {
background: $db-tertiary; background: $db-tertiary;
} }
&.collapsed {
height: initial;
}
} }
.code-row-lang { .code-row-lang {

View file

@ -16,6 +16,7 @@
grid-area: right-sidebar; grid-area: right-sidebar;
padding-top: $s-8; padding-top: $s-8;
padding-left: $s-12; padding-left: $s-12;
overflow: hidden;
&.viewer-code { &.viewer-code {
height: calc(100vh - $s-48); height: calc(100vh - $s-48);
} }