Skip to content

Commit

Permalink
fix: improve bg-color dark mode in iframe
Browse files Browse the repository at this point in the history
  • Loading branch information
luizchaves committed Oct 23, 2024
1 parent 7e63029 commit 4920bd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/HtmlPreview.astro
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const codeName = src?.split('/')?.at(-2);
}
</div>

<div class={`code-preview overflow-hidden !m-0 ${showDarkMode ? 'bg-[#0d1117]' : '!bg-white'}`}>
<div class={`code-preview overflow-hidden !m-0 ${showDarkMode === true && 'bg-[#0d1117]'} ${showDarkMode === false && '!bg-white'}`}>
{
src && isShowIframe ? (
<Iframe
Expand All @@ -62,6 +62,6 @@ const codeName = src?.split('/')?.at(-2);

<style>
.code-preview {
@apply bg-white dark:bg-[#0d1117] rounded p-4;
@apply dark:bg-[#0d1117] rounded p-4;
}
</style>

0 comments on commit 4920bd1

Please sign in to comment.