mirror of
https://github.com/bitbaum/bip-kit.git
synced 2026-12-04 04:57:05 +01:00
#27 cleared the code out from under the copy button. This fixes the other half of the same rule: the button was never visible on a phone at all. `.bp-copy` rested at `opacity: 0` and was revealed only by `.bp-codeblock-body:hover`. A touch device never enters a hover state, so on phones and tablets the control stayed at opacity 0 permanently — in the DOM, in the accessibility tree, and tappable, with nothing on screen to say it was there. Measured at 390x844 with hasTouch against live pages on two consumers (kivvi, aoz-housing): computed opacity 0 on every code block, and no gesture that can change it. So the base rule now rests at `opacity: 1`, and the fade-until-hover moves inside `@media (hover: hover) and (pointer: fine)` — it is an enhancement for pointers that can hover, not the definition of the control. Hover-capable desktops are unchanged: same fade-in, same resting invisibility. Because --bp-copy-clearance from #27 is unconditional, a permanently visible button still covers no code. Proven against live content by injecting the candidate stylesheet into pages that still ship 0.2.3/0.2.4, so only the stylesheet varies: kivvi preisgestaltung-secondhand 1440 hover : opacity 0 -> 0 overlap 0 -> 0 (unchanged) 390 touch : opacity 0 -> 1 overlap 939px² -> 0 (fixed) aoz chore-fairness-is-a-balance 1440 hover : opacity 0 -> 0 (unchanged) 390 touch : opacity 0 -> 1 (fixed) Guarded in test/styles.test.js next to the clearance guards, because this class of bug is invisible to every render test — the HTML is byte-identical whether the button can be seen or not. Mutation-proved: parking the resting opacity back at 0, hoisting the hide out of the hover query, and deleting the query outright each turn the suite red. The two guards #27 added were re-proved in the same run (shrinking the clearance token, removing the print reclaim) to confirm this change does not soften them; the unmutated tree is green before and after. Claude-Session: https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>