22@config "../../tailwind.config.cjs" ;
33@import "./callouts.css" ;
44
5+ : root {
6+ --code-bg-light : # dfe2e7 ;
7+ --code-bg-dark : # 2e3440 ;
8+ }
9+
510header {
611 a [target = "_blank" ] {
712 & ::after {
@@ -86,7 +91,7 @@ input[type="radio"]:checked + label {
8691
8792.terminal-wrapper {
8893 @apply rounded-lg;
89- background : # 2e3440 ;
94+ background : var ( --code-bg-light ) ;
9095 img {
9196 margin-top : 0px ;
9297 margin-bottom : 0px ;
@@ -95,28 +100,44 @@ input[type="radio"]:checked + label {
95100 @apply font-normal overflow-x-auto font-mono bg-transparent rounded-t-none;
96101
97102 code {
98- color : # d8dee9 ;
99103 .prompt {
100- @apply select-none text-slate-400 ;
104+ @apply select-none opacity-60 ;
101105 }
102106 }
103107 }
104108}
105109
110+ html .dark .terminal-wrapper {
111+ background : var (--code-bg-dark );
112+ }
113+
106114.terminal-wrapper .top-bar {
115+ background : var (--code-bg-light );
116+
107117 & .powershell {
108- @apply justify-between text-white;
109- background : # 1f2023 ;
118+ @apply justify-between text-gray-800 bg-gray-300;
110119 }
111120 & .powershell-ubuntu {
112- @apply justify-between text-white;
113- background : # 1f2023 ;
121+ @apply justify-between text-gray-800 bg-gray-300;
114122 }
115123 & .ubuntu {
116124 @apply justify-end;
117125 }
118126}
119127
128+ html .dark .terminal-wrapper .top-bar {
129+ background : var (--code-bg-dark );
130+
131+ & .powershell {
132+ @apply text-white;
133+ background : # 1f2023 ;
134+ }
135+ & .powershell-ubuntu {
136+ @apply text-white;
137+ background : # 1f2023 ;
138+ }
139+ }
140+
120141.prose .terminal-wrapper pre {
121142 @apply my-0;
122143}
@@ -172,6 +193,19 @@ pre.astro-code code {
172193 padding-bottom : 2px ;
173194}
174195
196+ /* Shiki dual theme support - override backgrounds for better contrast */
197+ pre .astro-code ,
198+ pre .astro-code span {
199+ color : var (--shiki-light ) !important ;
200+ background-color : var (--code-bg-light ) !important ;
201+ }
202+
203+ html .dark pre .astro-code ,
204+ html .dark pre .astro-code span {
205+ color : var (--shiki-dark ) !important ;
206+ background-color : var (--code-bg-dark ) !important ;
207+ }
208+
175209/* Copy buttons */
176210button .copy ,
177211.shiki-copy ,
@@ -183,8 +217,8 @@ pre.astro-code > button.copy {
183217 border : none;
184218 border-radius : 4px ;
185219 cursor : pointer;
186- background-color : rgba (255 , 255 , 255 , 0.1 );
187- color : white ;
220+ background-color : rgba (0 , 0 , 0 , 0.1 );
221+ color : # 333 ;
188222 opacity : 0.5 ;
189223 z-index : 10 ;
190224 pointer-events : auto;
@@ -194,6 +228,13 @@ pre.astro-code > button.copy {
194228 background-color 0.2s ;
195229}
196230
231+ html .dark button .copy ,
232+ html .dark .shiki-copy ,
233+ html .dark pre .astro-code > button .copy {
234+ background-color : rgba (255 , 255 , 255 , 0.1 );
235+ color : white;
236+ }
237+
197238.terminal-code-container button .copy ,
198239.terminal-code-container .shiki-copy ,
199240.terminal-code-container pre .astro-code > button .copy {
@@ -216,13 +257,20 @@ button.copy:hover,
216257.shiki-copy : hover ,
217258pre .astro-code > button .copy : hover {
218259 opacity : 1 ;
260+ background-color : rgba (0 , 0 , 0 , 0.2 );
261+ }
262+
263+ html .dark button .copy : hover ,
264+ html .dark .shiki-copy : hover ,
265+ html .dark pre .astro-code > button .copy : hover {
219266 background-color : rgba (255 , 255 , 255 , 0.2 );
220267}
221268
222269button .copy .copied ,
223270.shiki-copy .copied ,
224271pre .astro-code > button .copy .copied {
225- background-color : # 28a745 ;
272+ background-color : # 0891b2 !important ;
273+ color : white !important ;
226274 opacity : 1 ;
227275}
228276
0 commit comments