@@ -86,7 +86,7 @@ input[type="radio"]:checked + label {
8686
8787.terminal-wrapper {
8888 @apply rounded-lg;
89- background : # 2e3440 ;
89+ background : var ( --shiki-light-bg , # e6e9ef ) ;
9090 img {
9191 margin-top : 0px ;
9292 margin-bottom : 0px ;
@@ -95,28 +95,44 @@ input[type="radio"]:checked + label {
9595 @apply font-normal overflow-x-auto font-mono bg-transparent rounded-t-none;
9696
9797 code {
98- color : # d8dee9 ;
9998 .prompt {
100- @apply select-none text-slate-400 ;
99+ @apply select-none opacity-60 ;
101100 }
102101 }
103102 }
104103}
105104
105+ html .dark .terminal-wrapper {
106+ background : var (--shiki-dark-bg , # 2e3440 );
107+ }
108+
106109.terminal-wrapper .top-bar {
110+ @apply bg-gray-200;
111+
107112 & .powershell {
108- @apply justify-between text-white;
109- background : # 1f2023 ;
113+ @apply justify-between text-gray-800 bg-gray-300;
110114 }
111115 & .powershell-ubuntu {
112- @apply justify-between text-white;
113- background : # 1f2023 ;
116+ @apply justify-between text-gray-800 bg-gray-300;
114117 }
115118 & .ubuntu {
116119 @apply justify-end;
117120 }
118121}
119122
123+ html .dark .terminal-wrapper .top-bar {
124+ @apply bg-slate-700;
125+
126+ & .powershell {
127+ @apply text-white;
128+ background : # 1f2023 ;
129+ }
130+ & .powershell-ubuntu {
131+ @apply text-white;
132+ background : # 1f2023 ;
133+ }
134+ }
135+
120136.prose .terminal-wrapper pre {
121137 @apply my-0;
122138}
@@ -172,6 +188,19 @@ pre.astro-code code {
172188 padding-bottom : 2px ;
173189}
174190
191+ /* Shiki dual theme support */
192+ pre .astro-code ,
193+ pre .astro-code span {
194+ color : var (--shiki-light ) !important ;
195+ background-color : var (--shiki-light-bg ) !important ;
196+ }
197+
198+ html .dark pre .astro-code ,
199+ html .dark pre .astro-code span {
200+ color : var (--shiki-dark ) !important ;
201+ background-color : var (--shiki-dark-bg ) !important ;
202+ }
203+
175204/* Copy buttons */
176205button .copy ,
177206.shiki-copy ,
@@ -183,8 +212,8 @@ pre.astro-code > button.copy {
183212 border : none;
184213 border-radius : 4px ;
185214 cursor : pointer;
186- background-color : rgba (255 , 255 , 255 , 0.1 );
187- color : white ;
215+ background-color : rgba (0 , 0 , 0 , 0.1 );
216+ color : # 333 ;
188217 opacity : 0.5 ;
189218 z-index : 10 ;
190219 pointer-events : auto;
@@ -194,6 +223,13 @@ pre.astro-code > button.copy {
194223 background-color 0.2s ;
195224}
196225
226+ html .dark button .copy ,
227+ html .dark .shiki-copy ,
228+ html .dark pre .astro-code > button .copy {
229+ background-color : rgba (255 , 255 , 255 , 0.1 );
230+ color : white;
231+ }
232+
197233.terminal-code-container button .copy ,
198234.terminal-code-container .shiki-copy ,
199235.terminal-code-container pre .astro-code > button .copy {
@@ -216,13 +252,20 @@ button.copy:hover,
216252.shiki-copy : hover ,
217253pre .astro-code > button .copy : hover {
218254 opacity : 1 ;
255+ background-color : rgba (0 , 0 , 0 , 0.2 );
256+ }
257+
258+ html .dark button .copy : hover ,
259+ html .dark .shiki-copy : hover ,
260+ html .dark pre .astro-code > button .copy : hover {
219261 background-color : rgba (255 , 255 , 255 , 0.2 );
220262}
221263
222264button .copy .copied ,
223265.shiki-copy .copied ,
224266pre .astro-code > button .copy .copied {
225- background-color : # 28a745 ;
267+ background-color : # 0891b2 !important ;
268+ color : white !important ;
226269 opacity : 1 ;
227270}
228271
0 commit comments