Skip to content

Commit ac788b8

Browse files
committed
💄 style(app): always-visible copy button, green copied state, hover effects
- Copy button: Always visible (not just on hover) - Copy button: Glass background with backdrop blur - Copy button: Hover darkens + lifts shadow - Copy button: Green tint when copied successfully - All these work across every theme
1 parent fd307ce commit ac788b8

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

‎packages/app/src/index.css‎

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,19 +226,35 @@
226226
color: var(--markdown-code) !important;
227227
}
228228

229-
/* --- Code block copy button: Tasteful pill-style --- */
229+
/* --- Code block copy button: Always visible, tasteful pill-style --- */
230+
[data-slot="markdown-copy-button"] {
231+
opacity: 1 !important;
232+
pointer-events: auto !important;
233+
}
234+
230235
[data-slot="markdown-copy-button"][data-variant="secondary"] {
231236
border-radius: 8px !important;
232237
padding: 4px 8px !important;
233238
font-size: 11px !important;
234239
height: auto !important;
235240
width: auto !important;
236241
aspect-ratio: unset !important;
237-
background: var(--surface-raised-stronger-non-alpha) !important;
242+
background: color-mix(in srgb, var(--surface-raised-stronger-non-alpha) 85%, transparent) !important;
238243
border: 1px solid var(--border-weaker-base) !important;
239244
box-shadow: var(--shadow-xs) !important;
240245
backdrop-filter: blur(8px);
241246
-webkit-backdrop-filter: blur(8px);
247+
transition: background-color 150ms ease, box-shadow 150ms ease;
248+
}
249+
250+
[data-slot="markdown-copy-button"][data-variant="secondary"]:hover {
251+
background: var(--surface-raised-stronger-non-alpha) !important;
252+
box-shadow: var(--shadow-sm) !important;
253+
}
254+
255+
[data-slot="markdown-copy-button"][data-copied="true"] {
256+
background: var(--surface-success-base) !important;
257+
border-color: var(--border-success-base) !important;
242258
}
243259

244260
/* --- Reasoning/thinking: Collapsible visual treatment --- */

0 commit comments

Comments
 (0)