Skip to content

Commit b0a5fd2

Browse files
style: simplify copy button labels
Co-authored-by: jamesmontemagno <1676321+jamesmontemagno@users.noreply.github.com> Agent-Logs-Url: https://github.com/copilot-dev-days/agent-lab-typescript/sessions/87511d3c-3e87-471f-8f89-7d0234d57e7d
1 parent 0f2740b commit b0a5fd2

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

docs/step.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@
172172
.markdown .code-copy-btn {
173173
position: absolute; top: 0.75rem; right: 0.75rem;
174174
display: inline-flex; align-items: center; justify-content: center;
175-
min-width: 5.5rem; padding: 0.4rem 0.75rem;
175+
min-width: max-content; padding: 0.4rem 0.75rem;
176176
border: 1px solid var(--border-color); border-radius: 999px;
177177
background: var(--bg-overlay); color: var(--text-secondary);
178178
font: inherit; font-size: 0.8rem; cursor: pointer; transition: all 0.2s ease;

docs/step.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@
223223
if (!container) return;
224224
const codeBlocks = container.querySelectorAll('pre');
225225

226-
codeBlocks.forEach((pre, index) => {
226+
codeBlocks.forEach((pre) => {
227227
const code = pre.querySelector('code');
228228
const codeText = code?.textContent?.trim();
229229
if (!codeText) return;
@@ -232,7 +232,7 @@
232232
copyButton.type = 'button';
233233
copyButton.className = 'code-copy-btn';
234234
copyButton.textContent = 'Copy';
235-
copyButton.setAttribute('aria-label', `Copy code block ${index + 1}`);
235+
copyButton.setAttribute('aria-label', 'Copy code');
236236

237237
const liveRegion = document.createElement('span');
238238
liveRegion.className = 'sr-only';

0 commit comments

Comments
 (0)