Skip to content

Conversation

peterpeterparker
Copy link
Contributor

Motivation

While I reverted #1473—a change originally intended to prevent overflow-x on mobile—I noticed that, despite CSS evolving, the issue still occasionally occurs when a code block inside a link within a list has text long enough to overflow the screen. Wrapping the text forces it to break onto a new line.

Before:

Capture d’écran 2025-02-05 à 06 31 38

After:

after

@@ -120,6 +120,10 @@ code {
overflow: auto;
}

ul a code {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems like quite a specific selector 😅

while this would probably fix the issue for the specific blog post you took a screenshot of, I assume it won't work for ol lists, for code blocks that are not links, and for code blocks that are not in lists.

do you think we can find a solution that would work for all of these cases? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point, I agree with you. That was a quick fix. I'll make a note and tackle this properly when I have more time. Meanwhile, I'll close the PR.

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

Successfully merging this pull request may close these issues.

2 participants