Fix copy button overlapping code and scrolling on small screens#51
Fix copy button overlapping code and scrolling on small screens#51
Conversation
…ight to pre.highlight Co-authored-by: DannyvdSluijs <618940+DannyvdSluijs@users.noreply.github.com>
|
@copilot On a small screen (iPhone SE for example) the copy button remains overlapping, see attached image |
…tton outside scrollable container Co-authored-by: DannyvdSluijs <618940+DannyvdSluijs@users.noreply.github.com>
Fixed in commit The fix moves the button to the outer
|
…g margins Co-authored-by: DannyvdSluijs <618940+DannyvdSluijs@users.noreply.github.com>

The copy button was appended inside
pre.highlight, which sits inside the horizontally-scrollablediv.highlightwrapper — causing it to overlap code on narrow viewports and scroll with the content when swiping right.Changes
assets/copy-code.js— append button todiv.highlighter-rouge(non-scrollable outer container) instead ofpre.highlightassets/index.css— addposition: relativetodiv.highlighter-rougeas the new stacking context; move button selector frompre.highlight > button→div.highlighter-rouge > button; change position tobottom-right; removemx-4margins that were causing leftward drift; dropposition: relativefrompre.highlightdist/style.*.css— compiled output updated to matchOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.