Repository navigation
Copy button never covers code; sticky header height for TagBrush - #5
Merged
Merged
Conversation
On a <pre> whose line is longer than the block (the install line on the demo page), the absolutely positioned Copy button sat over the end of the visible text: 5rem of end padding only helps once scrolled to the very end. Measured on the demo with TagBrush.css 2: text under the button at 360px and 1280px, "defer" hidden. The <pre> now has a transparent 5rem end border instead of the padding. The background shows through a border, so the block looks the same, but the scrollport ends before the button, so text never runs under it. It also gets overflow-x: auto, so this holds with no stylesheet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TagBrush.css keeps room above a heading you jump to under its sticky bar (<header data-layout="sticky">), but CSS can't read the bar's height, so the room is a fixed 5rem (7.5rem on phones). A bar taller than that, such as one that wraps to three rows on a phone (142px against 120px at 360px), still hid the heading. The nav behavior now watches a sticky page header with a ResizeObserver and sets --tag-header-height on <html> to its height; TagBrush.css's scroll padding reads it, falling back to the CSS value without TagAction. data-tagaction="off" on the header opts out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
deferon the demo). The<pre>now scrolls insideborder-inline-end: 5rem solid transparentinstead of padding, so its scroll area stops before the button. It looks the same, since the background shows through the border. Tested at 360, 700 and 1000px with TagBrush.css and at 360px with no stylesheet.body > header[data-layout="sticky"]sets--tag-header-heighton<html>. TagBrush.css's scroll padding reads it (kovirlabs/tagbrush, same branch name), so a heading you jump to clears a bar of any height.data-tagaction="off"opts out. Documented in llms.txt and the README.Size: 12,026 → 12,150 bytes gzipped. Tests: 175 passed locally in Chromium and WebKit (was 169), including dynamic insertion and resizing.
Merge after #4 (the demo page); I'll resolve the CHANGELOG heading conflict once #4 is in.
🤖 Generated with Claude Code