[diffs/editor] Add responsive for marker popup element#879
Conversation
…ut and responsiveness
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d8a7c5a808
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| translate: clamp(8px, var(--marker-x, 8px), calc(100cqw - 8px - 100%)) | ||
| var(--marker-y, 0); |
There was a problem hiding this comment.
Account for horizontal scroll when clamping popups
In horizontally scrollable editors, --marker-x comes from getCharX() as a content-space coordinate, and the absolute overlay scrolls with [data-code]. Clamping that coordinate to 100cqw caps every marker beyond the first viewport to a fixed content x; after the user scrolls right, the popup's visual position becomes clampedX - scrollLeft, so diagnostics on visible long-line text can render offscreen or far from the hovered marker. The clamp needs to include the current horizontal scroll offset or be applied in viewport coordinates.
Useful? React with 👍 / 👎.
[diffs/editor] Updated `editor.css` for marker popups to improve layout and responsiveness
[diffs/editor] Updated `editor.css` for marker popups to improve layout and responsiveness
…r#879) [diffs/editor] Updated `editor.css` for marker popups to improve layout and responsiveness
↓