#260: .swapbtn grid for copy feedback (fix attempt 2)
Label and checkmark stack in one grid cell (inline-grid, grid-area 1/1, checkmark visibility-hidden until .ok), so the button width is static by construction across the click. Replaces the min-width pin from fix attempt 1, which enlarged buttons by up to 0.64px (ceil of fractional width) and leaked the pin after restore. Applies to paste-view Copy/Link (paste.html + paste.js copyFeedback) and the /new result-box copy button (new.js). Verified with CDP bounding-box probes: Copy width/x identical before/during/after at 1400x900 and 375x812 (including the previously failing 52.36px mobile case), Link button static, checkmark visible during feedback, no minWidth pin set.
This commit is contained in:
@@ -8,8 +8,8 @@
|
||||
<div class="spacer"></div>
|
||||
<button type="button" class="iconbtn wrap-toggle" title="Toggle line wrap" aria-pressed="false">Wrap</button>
|
||||
<a class="iconbtn" href="/raw/{{.ID}}">Raw</a>
|
||||
<a class="iconbtn" href="#" id="copy-link-btn">Link</a>
|
||||
<a class="iconbtn" href="#" id="copy-btn">Copy</a>
|
||||
<a class="iconbtn swapbtn" href="#" id="copy-link-btn"><span class="btn-label">Link</span><span class="btn-check">✓</span></a>
|
||||
<a class="iconbtn swapbtn" href="#" id="copy-btn"><span class="btn-label">Copy</span><span class="btn-check">✓</span></a>
|
||||
{{if .DeletionToken}}<a class="iconbtn danger" href="#" id="delete-btn">Delete</a>{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user