Skip to content

Fix copy button hidden behind codebox on brand page#29

Merged
kiyarose merged 2 commits into
mainfrom
copilot/fix-copy-button-visibility
Mar 20, 2026
Merged

Fix copy button hidden behind codebox on brand page#29
kiyarose merged 2 commits into
mainfrom
copilot/fix-copy-button-visibility

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 20, 2026

The copy button was position: absolute but rendered as a preceding sibling of <pre class="codebox">, causing the pre (later in DOM order, same stacking context) to paint over it. Additionally, the button had a transparent background, making it unreadable when overlapping code text.

Changes

  • brand.html — Moved <button class="copy-btn"> into a new <div class="codebox-wrapper"> that wraps the <pre class="codebox">. This keeps the button outside the scrollable <pre> so it stays pinned in the top-right corner even when code content overflows horizontally.
  • brand.css — Added .codebox-wrapper rule with position: relative, max-width, and margin (previously on a duplicate pre.codebox rule). Removed position: relative from pre.codebox. Changed .copy-btn background from transparent to var(--card-bg) so it is always readable against code text in both light and dark themes. Added cursor: pointer and z-index: 1. Removed the now-redundant "center codebox" pre.codebox rule and consolidated text-align: left into the single pre.codebox block.
<!-- Before: button is sibling before pre, gets painted over, no background -->
<div style="position: relative">
  <button class="copy-btn" id="copyBtn">Copy</button>
  <pre class="codebox" id="codeBox"></pre>
</div>

<!-- After: button is sibling of pre inside a positioned wrapper, solid background -->
<div class="codebox-wrapper">
  <button class="copy-btn" id="copyBtn" aria-label="Copy embed code">
    Copy
  </button>
  <pre class="codebox" id="codeBox" aria-live="polite"><code id="codeContent"></code></pre>
</div>
Original prompt

This section details on the original issue you should resolve

<issue_title>Bug: Copy button on brand page is barely visible.</issue_title>
<issue_description>There is a bug on the brand page where the copy button for the brand assets is hidden behind the codebox, making it hard to click and low visibility.

Image</issue_description>

<agent_instructions>Please address the current issue, when moving the button place it in a place that would feel natural for the page following all current style guidelines for the project. Make sure to confirm nothing else was broken or changed in the process of moving the button</agent_instructions>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

@deepsource-io
Copy link
Copy Markdown
Contributor

deepsource-io Bot commented Mar 20, 2026

DeepSource Code Review

We reviewed changes in 4a11e27...4c69cb0 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
Secrets Mar 20, 2026 6:00p.m. Review ↗
Shell Mar 20, 2026 6:00p.m. Review ↗
JavaScript Mar 20, 2026 6:00p.m. Review ↗

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Mar 20, 2026

Deploying kvgrow with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4c69cb0
Status: ✅  Deploy successful!
Preview URL: https://667226d1.kvgrow.pages.dev
Branch Preview URL: https://copilot-fix-copy-button-visi.kvgrow.pages.dev

View logs

@kiyarose kiyarose marked this pull request as ready for review March 20, 2026 17:48
Copilot AI review requested due to automatic review settings March 20, 2026 17:48
Copilot AI changed the title [WIP] Fix copy button visibility on brand page Fix copy button hidden behind codebox on brand page Mar 20, 2026
Copilot AI requested a review from kiyarose March 20, 2026 17:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to fix the “Copy” button visibility/clickability on brand.html’s badge embed code box by adjusting its DOM placement and stacking/cursor styling so it appears above the codebox content.

Changes:

  • Moved the copy button into the <pre class="codebox"> element and removed the previously used positioned wrapper.
  • Updated .copy-btn styling to add cursor: pointer and z-index: 1.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
brand.html Moves the copy button into the codebox <pre> and removes the wrapper around the codebox.
brand.css Adds cursor + z-index to ensure the copy button is clickable and stacks above code content.

Comment thread brand.html Outdated
Comment thread brand.html Outdated
Comment thread brand.css
Copy link
Copy Markdown
Member

@kiyarose kiyarose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

Copy button does not have a background, and as thus, on top of the text.
This is an accessibility issue.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 20, 2026

Image

Copy button does not have a background, and as thus, on top of the tex...

Fixed in d392f0a. The button now has background: var(--card-bg) (previously transparent), so it always renders with a solid fill matching the page card background in both light and dark themes. The button was also moved outside the <pre> into a positioned wrapper (div.codebox-wrapper) so it won't scroll with the code content.

Light theme:
Light theme

The button now sits clearly above the codebox with a solid background in both themes.

Copilot AI requested a review from kiyarose March 20, 2026 17:58
@kiyarose kiyarose enabled auto-merge (squash) March 20, 2026 18:00
@kiyarose kiyarose force-pushed the copilot/fix-copy-button-visibility branch from d392f0a to 4c69cb0 Compare March 20, 2026 18:00
@sonarqubecloud
Copy link
Copy Markdown

@kiyarose kiyarose merged commit be31691 into main Mar 20, 2026
7 of 8 checks passed
@kiyarose kiyarose deleted the copilot/fix-copy-button-visibility branch March 20, 2026 18:01
kiyarose added a commit that referenced this pull request Mar 29, 2026
* donate: follow system theme instead of forcing dark mode (#21)

* Initial plan

* fix: follow system theme on donate page instead of forcing dark mode

Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* style: format code with Prettier and StandardJS

This commit fixes the style issues introduced in 04d1db2 according to the output
from Prettier and StandardJS.

Details: #21

* fix: head script uses only system theme, no localStorage, on donate page

Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>
Co-authored-by: Kiya Rose Ren-Miyakari <kiya.rose@sillylittle.tech>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* Switch primary font to Lexend and refine typography weights (#22)

* Switch primary font to Lexend and keep footer in SLF Dreamer

Co-authored-by: Kiya Rose Ren-Miyakari <kiya.rose@sillylittle.tech>

* Increase button font weight and lighten Tech wordmark

Co-authored-by: Kiya Rose Ren-Miyakari <kiya.rose@sillylittle.tech>

* style: format code with Prettier and StandardJS

This commit fixes the style issues introduced in 3e8c457 according to the output
from Prettier and StandardJS.

Details: #22

* Move Google Fonts to `<link>` preconnect and fix "Tech" wordmark font (#24)

* Initial plan

* perf: move Google Fonts to link preconnect and fix Tech wordmark font

Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>

* docs: add comment to base.css noting Lexend must be loaded via link in HTML head

Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>
Co-authored-by: Kiya Rose Ren-Miyakari <kiya.rose@sillylittle.tech>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Fix regex security hotspot in brand.html; deduplicate theme-toggle markup (#25)

* Initial plan

* fix: address regex security hotspot in brand.html and deduplicate theme-toggle markup

- brand.html: change lazy quantifier [^&]*? to greedy [^&]* in highlightHtml
  regex; add comment noting input is machine-generated (not user input) so ReDoS
  is not a concern
- theme.js: add injectThemeToggleButton() so the button is defined in one place;
  init() now injects it automatically when #themeToggle is absent
- index.html, apply.html, donate.html, brand.html: remove 38-line duplicated
  theme-toggle <button> block from each file (replaced with a brief comment)

Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>
Agent-Logs-Url: https://github.com/SillyLittleTech/lander/sessions/d607b3be-436a-4aac-9f9f-13f8be74a195

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>

* Create dependabot.yml for version updates

Add initial configuration for Dependabot updates.

* Fix copy button hidden behind codebox on brand page (#29)

* Initial plan

* Fix: Move copy button inside codebox to fix visibility on brand page

Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>
Agent-Logs-Url: https://github.com/SillyLittleTech/lander/sessions/95786c2e-8426-4962-9e32-0a5d8b95169d

* Fix copy button: solid background, outside scroll container, clean up duplicate CSS rule

Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>
Agent-Logs-Url: https://github.com/SillyLittleTech/lander/sessions/a3f820f0-13cd-462d-99b7-6f488c044450

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>

* Set package ecosystem to 'npm' in dependabot config

* Fix FOUC on Contact Us page and resolve SonarCloud maintainability warnings (#31)

* Initial plan

* Fix: add anti-FOUC theme script to apply.html head

Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>
Agent-Logs-Url: https://github.com/SillyLittleTech/lander/sessions/a98d089c-ab11-4c4b-a4fa-7650d3896cd8

* Fix SonarCloud empty catch block warning in anti-FOUC scripts

Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>
Agent-Logs-Url: https://github.com/SillyLittleTech/lander/sessions/6f4b51b7-2269-4f71-ae73-973284fcaffc

* Fix SonarCloud unused catch binding in anti-FOUC scripts (use optional catch binding)

Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>
Agent-Logs-Url: https://github.com/SillyLittleTech/lander/sessions/a28f3a6f-996a-4016-8937-3b1ac822baa6

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>

* fix: resolve 53 SonarCloud code smells across 6 files (#27)

* Initial plan

* fix: resolve 53 SonarCloud code smells across brand.css, brand.html, donate.html, index.html, script.js, theme.js

Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>
Agent-Logs-Url: https://github.com/SillyLittleTech/lander/sessions/c16e496a-1317-4d1b-8e22-e77d44847609

* Changes before error encountered

Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>
Agent-Logs-Url: https://github.com/SillyLittleTech/lander/sessions/6ab0c607-d2b4-4328-b631-5e9ab7d8bab2

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>

* Add package.json listing all project dependencies (#32)

Agent-Logs-Url: https://github.com/SillyLittleTech/lander/sessions/4be40485-ef5d-4df0-a8f7-ba0e3df5456a

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>

* Create CNAME

* Delete CNAME

* Replace contributor links with Projects page; add floating contributor profile icons (#36)

* Initial plan

* Modernize links: add projects link, contributor profile icons

Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>
Agent-Logs-Url: https://github.com/SillyLittleTech/lander/sessions/a574598b-7edf-4eb0-aa1e-5a759150361d

* Move contributor icons to contributors.json, load dynamically

Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>
Agent-Logs-Url: https://github.com/SillyLittleTech/lander/sessions/dfe39997-dff4-4df4-a515-5832beec1d91

* Move contributor icons above links in right section

Agent-Logs-Url: https://github.com/SillyLittleTech/lander/sessions/c06585fb-4ad8-402f-bfbe-eb9b2a46e50c

Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>

* enhance: better terminology on apply page (#37)

Apply page now better serves as a versatile contact us page.
The terminology on this page now better serves any possible reason for contact, and is welcoming to projects of all types.

* Update redirects and apply page header (#38)

* Update _redirects with new project links

Added new redirects for various projects and contributions.

* Update title and header for apply.html

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Copy button on brand page is barely visible.

3 participants