Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Site issue: code blocks twitch on hover #5448

Closed
Inve1951 opened this issue May 11, 2023 · 2 comments
Closed

Site issue: code blocks twitch on hover #5448

Inve1951 opened this issue May 11, 2023 · 2 comments

Comments

@Inve1951
Copy link
Contributor

There's a new visual issue with https://coffeescript.org.

The first time you hover some code block CodeMirror kicks in. When it does that it incorrectly overrides a CSS rule.

/* before */
.CodeMirror pre {
    line-height: 1.4em;
}

/* after */
.CodeMirror pre.CodeMirror-line {
    line-height: inherit;
}

On my device this reduces the effective line height from 19.6px to 17.5px, shrinking the vertical size of the code block.

But there's something else wrong too. Even with that rule disabled, most of the time CodeMirror kicks in, the container grows 1px in height.

Tested on Firefox.

@GeoffreyBooth
Copy link
Collaborator

Okay, can you suggest a fix?

@Inve1951
Copy link
Contributor Author

Depends on what broke it. I haven't experienced this before so something must have changed. Question is what. I doubt that it's caused by browser updates this time around.

edemaine added a commit to edemaine/coffeescript that referenced this issue May 11, 2023
Partial solution to jashkenas#5448.  Fixes changing `line-height`
but there are still tiny discrepancies in overall size.
GeoffreyBooth pushed a commit that referenced this issue May 11, 2023
* Fix line-height change from hover

Partial solution to #5448.  Fixes changing `line-height`
but there are still tiny discrepancies in overall size.

* Rebuild for 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants