@@ -120,6 +120,54 @@ List<StyleRule> get siteStyles => [
120120 'line-height' : 'inherit' ,
121121 },
122122 ),
123+ // Code block copy button: match Docusaurus style.
124+ // Framework sets opacity:0 and position:absolute AFTER our styles,
125+ // so we use !important to override.
126+ css ('.code-block button' ).styles (
127+ display: Display .flex,
128+ padding: Padding .all (0.25 .rem),
129+ border: Border .all (color: Color ('#dadde1' ), width: 1. px),
130+ radius: BorderRadius .circular (0.4 .rem),
131+ justifyContent: JustifyContent .center,
132+ alignItems: AlignItems .center,
133+ backgroundColor: Colors .white,
134+ raw: {
135+ 'position' : 'absolute !important' ,
136+ 'top' : '0.5rem' ,
137+ 'right' : '0.5rem' ,
138+ 'width' : 'auto !important' ,
139+ 'height' : 'auto !important' ,
140+ 'opacity' : '0 !important' ,
141+ 'color' : '#606770 !important' ,
142+ 'cursor' : 'pointer' ,
143+ 'transition' : 'opacity 0.2s, color 0.2s' ,
144+ },
145+ ),
146+ css ('.code-block button svg' ).styles (
147+ raw: {'width' : '18px !important' , 'height' : '18px !important' },
148+ ),
149+ css ('.code-block:hover button' ).styles (
150+ raw: {'opacity' : '0.5 !important' },
151+ ),
152+ css ('.code-block button:hover' ).styles (
153+ raw: {'opacity' : '1 !important' , 'color' : '#1c1e21 !important' },
154+ ),
155+ css ('[data-theme="dark"] .code-block button' ).styles (
156+ border: Border .all (color: Color ('#444950' ), width: 1. px),
157+ backgroundColor: Color ('#1e1e1e' ),
158+ raw: {'color' : '#a0a0a0 !important' },
159+ ),
160+ css ('[data-theme="dark"] .code-block button:hover' ).styles (
161+ raw: {'color' : 'white !important' },
162+ ),
163+ // Green check icon after successful copy (CheckIcon has no <rect>, CopyIcon does).
164+ // Must also cover :hover state so green wins over hover color.
165+ css ('.code-block button:not(:has(svg rect))' ).styles (
166+ raw: {'color' : '#00a86b !important' , 'opacity' : '1 !important' },
167+ ),
168+ css ('.code-block button:not(:has(svg rect)):hover' ).styles (
169+ raw: {'color' : '#00a86b !important' },
170+ ),
123171 // Content links: primary color, no underline by default (matching original)
124172 css ('.content a:not(.workflow-card):not(.page-nav-prev):not(.page-nav-next)' ).styles (
125173 textDecoration: TextDecoration .none,
@@ -227,11 +275,13 @@ List<StyleRule> get siteStyles => [
227275 // Dark mode: show moon (first span), hide sun (last span).
228276 // ───────────────────────────────────────────────────────────────────────
229277 css ('.theme-toggle' ).styles (
230- padding: Padding .all (4. px),
231- radius: BorderRadius .circular (50. percent),
278+ padding: Padding .zero,
279+ justifyContent: JustifyContent .center,
280+ alignItems: AlignItems .center,
232281 raw: {
233282 'width' : '32px' ,
234283 'height' : '32px' ,
284+ 'border-radius' : '50% !important' ,
235285 'box-sizing' : 'border-box' ,
236286 'cursor' : 'pointer' ,
237287 },
@@ -243,8 +293,10 @@ List<StyleRule> get siteStyles => [
243293 backgroundColor: Color ('rgba(255, 255, 255, 0.1)' ),
244294 ),
245295 css ('.theme-toggle svg' ).styles (
246- raw: {'width' : '24px ' , 'height' : '24px ' },
296+ raw: {'width' : '20px ' , 'height' : '20px ' },
247297 ),
298+ // Reverse icons: show current state (sun in light, moon in dark).
299+ // Framework default: moon in light, sun in dark.
248300 css ('[data-theme="light"] .theme-toggle > span:first-child' ).styles (
249301 raw: {'display' : 'none !important' },
250302 ),
0 commit comments