Skip to content

Render visible checkmark on checked task list checkboxes in PR comments#8714

Merged
alexr00 merged 2 commits intomainfrom
copilot/fix-visual-indistinguishability-checkboxes
Apr 29, 2026
Merged

Render visible checkmark on checked task list checkboxes in PR comments#8714
alexr00 merged 2 commits intomainfrom
copilot/fix-visual-indistinguishability-checkboxes

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 28, 2026

Checked task list items (- [x]) in PR comments and descriptions render almost identically to unchecked ones — only the background is marginally darker, with no checkmark — making it impossible to tell completed items at a glance.

issue repro

Root cause

input[type='checkbox'] in webviews/common/common.css uses appearance: none, suppressing the native checkmark. The themed checkmark is drawn by .checkbox-wrapper::after, which requires the input to be wrapped in a .checkbox-wrapper. Markdown-rendered task lists emit <li class="task-list-item"><input type="checkbox" checked disabled> …</li> with no such wrapper, so checked boxes get a slightly altered background and nothing else.

Change

  • Add a ::before on .task-list-item (since pseudo-elements don't render on <input>), gated by :has(> input[type='checkbox']:checked), positioned over the checkbox.
  • Reuse the existing rotated-border checkmark technique and --vscode-checkbox-foreground color so it stays consistent with .checkbox-wrapper::after across light / dark / high-contrast themes.
  • Cover both shapes produced by upstream renderers: direct child <input> (GitHub-rendered bodyHTML) and <p>-wrapped <input> (marked).
.task-list-item {
    position: relative;
}

.task-list-item:has(> input[type='checkbox']:checked)::before,
.task-list-item:has(> p > input[type='checkbox']:checked)::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 6px;
    width: 5px;
    height: 10px;
    border: solid var(--vscode-checkbox-foreground);
    border-width: 0 1px 1px 0;
    transform: rotate(45deg);
    pointer-events: none;
}

Result

fixed rendering

Existing .checkbox-wrapper-based checkboxes (e.g. automergeSelect) are untouched — the new selector only matches .task-list-item descendants.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • accounts.google.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --use-angle=swiftshader-webgl --crashpad-handler-pid=8090 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/com.google.Chrome.scoped_dir.K8RhxG --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,10949126254142358948,6409727862905241005,262144 --disable-features=PaintHolding --variations-seed-version --pseudonymization-salt-handle=7,i,9245562396997908308,5922421533736500619,4 --trace-process-track-uuid=3190708989122997041 (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome --headless --disable-gpu --no-sandbox --window-size=600,500 --screenshot=screenshot.png file:///tmp/checkbox-test/test.html (dns block)
  • clients2.google.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --use-angle=swiftshader-webgl --crashpad-handler-pid=8090 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/com.google.Chrome.scoped_dir.K8RhxG --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,10949126254142358948,6409727862905241005,262144 --disable-features=PaintHolding --variations-seed-version --pseudonymization-salt-handle=7,i,9245562396997908308,5922421533736500619,4 --trace-process-track-uuid=3190708989122997041 (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome --headless --disable-gpu --no-sandbox --window-size=600,500 --screenshot=screenshot.png file:///tmp/checkbox-test/test.html (dns block)
  • clientservices.googleapis.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --use-angle=swiftshader-webgl --crashpad-handler-pid=8090 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/com.google.Chrome.scoped_dir.K8RhxG --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,10949126254142358948,6409727862905241005,262144 --disable-features=PaintHolding --variations-seed-version --pseudonymization-salt-handle=7,i,9245562396997908308,5922421533736500619,4 --trace-process-track-uuid=3190708989122997041 (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome --headless --disable-gpu --no-sandbox --window-size=600,500 --screenshot=screenshot.png file:///tmp/checkbox-test/test.html (dns block)
  • redirector.gvt1.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --use-angle=swiftshader-webgl --crashpad-handler-pid=8090 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/com.google.Chrome.scoped_dir.K8RhxG --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,10949126254142358948,6409727862905241005,262144 --disable-features=PaintHolding --variations-seed-version --pseudonymization-salt-handle=7,i,9245562396997908308,5922421533736500619,4 --trace-process-track-uuid=3190708989122997041 (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome --headless --disable-gpu --no-sandbox --window-size=600,500 --screenshot=screenshot.png file:///tmp/checkbox-test/test.html (dns block)
  • safebrowsingohttpgateway.googleapis.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --use-angle=swiftshader-webgl --crashpad-handler-pid=8090 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/com.google.Chrome.scoped_dir.K8RhxG --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,10949126254142358948,6409727862905241005,262144 --disable-features=PaintHolding --variations-seed-version --pseudonymization-salt-handle=7,i,9245562396997908308,5922421533736500619,4 --trace-process-track-uuid=3190708989122997041 (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome --headless --disable-gpu --no-sandbox --window-size=600,500 --screenshot=screenshot.png file:///tmp/checkbox-test/test.html (dns block)
  • www.google.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --use-angle=swiftshader-webgl --crashpad-handler-pid=8090 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/com.google.Chrome.scoped_dir.K8RhxG --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,10949126254142358948,6409727862905241005,262144 --disable-features=PaintHolding --variations-seed-version --pseudonymization-salt-handle=7,i,9245562396997908308,5922421533736500619,4 --trace-process-track-uuid=3190708989122997041 (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome --headless --disable-gpu --no-sandbox --window-size=600,500 --screenshot=screenshot.png file:///tmp/checkbox-test/test.html (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Fix visual distinction between checked and unchecked checkboxes Render visible checkmark on checked task list checkboxes in PR comments Apr 28, 2026
Copilot AI requested a review from alexr00 April 28, 2026 12:10
@alexr00 alexr00 marked this pull request as ready for review April 29, 2026 08:43
Copilot AI review requested due to automatic review settings April 29, 2026 08:43
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

Updates the shared webview stylesheet to render an explicit checkmark for checked Markdown task-list checkboxes in PR descriptions/comments, improving visual clarity when appearance: none is used for themed checkboxes.

Changes:

  • Add .task-list-item styling to draw a checkmark via a pseudo-element when a child checkbox is :checked.
  • Use :has() selectors to cover both direct-child <input> and <p> > <input> task list structures.
  • Reuse existing checkmark drawing approach and VS Code theme variables for consistent appearance across themes.
Show a summary per file
File Description
webviews/common/common.css Adds checkmark rendering for checked Markdown task-list items that don’t use the existing .checkbox-wrapper mechanism.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

@alexr00 alexr00 merged commit 33b6565 into main Apr 29, 2026
10 checks passed
@alexr00 alexr00 deleted the copilot/fix-visual-indistinguishability-checkboxes branch April 29, 2026 09:36
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.

Checked checkboxes (- [x]) are visually indistinguishable from unchecked ones

4 participants