UX: reduce GitHub PR status icon size on mobile (#36558)

The recently added live status icons for GitHub PR oneboxes were too
large on narrow viewports, causing them to overlap with the PR title
text.

Reduced the icon width from 2.5em to 1.8em on mobile (matching the
existing .github-icon max-width) using the viewport.until(sm)
breakpoint.

**BEFORE**

<img width="1859" height="1411" alt="BEFORE"
src="https://github.com/user-attachments/assets/02198611-9ac1-4bb6-8776-9bef80c458f6"
/>

**AFTER**

<img width="1859" height="1411" alt="AFTER"
src="https://github.com/user-attachments/assets/64ccf4f3-bf45-489f-a83f-a1f385a65f41"
/>
This commit is contained in:
Régis Hanol
2025-12-09 14:24:16 +01:00
committed by GitHub
parent 3bb6ceeea9
commit 2f21c445e4
@@ -1,3 +1,5 @@
@use "lib/viewport";
.onebox.githubpullrequest .github-row {
--gh-icon-draft: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.25 1A2.25 2.25 0 0 1 4 5.372v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.251 2.251 0 0 1 3.25 1Zm9.5 14a2.25 2.25 0 1 1 0-4.5 2.25 2.25 0 0 1 0 4.5ZM2.5 3.25a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0ZM3.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm9.5 0a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM14 4.25a.75.75 0 0 1-.75.75h-2a.75.75 0 0 1 0-1.5h2a.75.75 0 0 1 .75.75Zm-.75 3.75a.75.75 0 0 0 0-1.5h-2a.75.75 0 0 0 0 1.5Z'/%3E%3C/svg%3E");
--gh-icon-open: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 3.25a2.25 2.25 0 1 1 3 2.122v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.25 2.25 0 0 1 1.5 3.25Zm5.677-.177L9.573.677A.25.25 0 0 1 10 .854V2.5h1A2.5 2.5 0 0 1 13.5 5v5.628a2.251 2.251 0 1 1-1.5 0V5a1 1 0 0 0-1-1h-1v1.646a.25.25 0 0 1-.427.177L7.177 3.427a.25.25 0 0 1 0-.354ZM3.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0 9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm8.25.75a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Z'/%3E%3C/svg%3E");
@@ -30,6 +32,10 @@
mask-size: 100% 100%;
mask-repeat: no-repeat;
mask-position: center;
@include viewport.until(sm) {
width: 1.8em;
}
}
}
}