Skip to content

Commit 2313114

Browse files
committed
🐛 fix: garantir visibilidade do CodePlayground no HTML
- Adicionar regras CSS explícitas para garantir visibilidade dos wrappers Sandpack - Configurar .sp-wrapper e .sp-stack com display:block, visibility:visible, opacity:1 - Configurar .sp-layout com display:flex e garantir largura de 100% - Remover regras CSS que forçavam flex-direction:column e order, que estavam interferindo com o layout padrão do Sandpack - Manter altura mínima de 400px para garantir visualização adequada Esta correção resolve o problema onde o componente CodePlayground estava sendo renderizado no DOM mas não aparecia visualmente devido a regras CSS conflitantes.
1 parent 2773892 commit 2313114

1 file changed

Lines changed: 19 additions & 22 deletions

File tree

‎src/css/custom.css‎

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,25 @@ div[class*='announcementBar'] a:hover {
297297
margin-bottom: 1rem;
298298
}
299299

300+
/* Sandpack CodePlayground - Garantir visibilidade */
301+
.sp-wrapper,
302+
.sp-stack {
303+
display: block !important;
304+
visibility: visible !important;
305+
opacity: 1 !important;
306+
height: auto !important;
307+
min-height: 400px !important;
308+
}
309+
310+
.sp-layout {
311+
display: flex !important;
312+
visibility: visible !important;
313+
opacity: 1 !important;
314+
height: auto !important;
315+
min-height: 400px !important;
316+
width: 100% !important;
317+
}
318+
300319
/* Sandpack CodePlayground - Aumentar tamanho da fonte do output */
301320
.sp-console-item,
302321
.sp-console-output,
@@ -341,25 +360,3 @@ button[aria-label="Run code"]::after {
341360
.sp-console-item .sp-console-warning {
342361
display: block !important;
343362
}
344-
345-
/* Reorganizar layout do painel lateral - dar mais espaço ao output */
346-
.sp-layout {
347-
display: flex !important;
348-
flex-direction: column !important;
349-
}
350-
351-
/* Console com mais espaço */
352-
.sp-console {
353-
flex: 1 1 auto !important;
354-
min-height: 200px !important;
355-
order: 1 !important;
356-
}
357-
358-
/* BotÔes de ação (reload, open sandbox) na parte inferior */
359-
.sp-button-group,
360-
.sp-preview-actions {
361-
order: 2 !important;
362-
margin-top: auto !important;
363-
padding-top: 8px !important;
364-
border-top: 1px solid var(--sp-colors-surface2, #e4e4e7);
365-
}

0 commit comments

Comments
 (0)