-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Fix: Long-string overflow [Fixes #14013] #14037
Conversation
…reens to avoid overflow on the layout and horizontal scroll
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @jorgezerpa, thanks for jumping on this.
I think this is good, just two things:
- @lukassim Just noting this is updating some syntax (not content) across these pages if we can pull them to Crowdin when ready
- @jorgezerpa We have TailwindCSS in ths repo, so let's ditch the custom class and just use the
break-all
class instead (see docs)
Thanks again!
ie.
<span class="break-all">`...long-string...`</span>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc: @pettinarip I think using a span here makes sense, but curious if you have any thoughts on this approach. I considered that we could apply this to the pre
tag that the back-ticks will parse into, but this could result in un-intended bugs for other text that uses this syntax.
The backtick will use a In short, I would add a new component for |
…ong-ethereum-address' with tailwind class 'break-words'
Hello @wackerow I'm happy to hear this works! I replaced the custom class with the tailwind class "break-words". I tried "break-all" but seems to not have effect here🤔 so I tried with "break-words" which has a similar behavior and it works well! Hi @pettinarip I tried to edit code tag as first, but the property break-all didn't make effect, so I decided to wrap it into an span. But this approach of create a new component could works too🤔 |
@pettinarip Sorry, I like the idea of a simple custom component, but I'd suggest not naming it "Code" and instead perhaps name it functionally as "BreakAll". |
@wackerow @pettinarip I can try create a component "BreakAll" as you mention, please confirm if it's needed 🙌 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the design side looks good! Thank you!!! @jorgezerpa
I think this resolved this more globally, so going to close this out. |
Description
I Created a new class ".long_ethereum_address" in global.css file. Such class has the property word-break set to break-all to allow the text to break to the next line if it is necessary.
Then I wrapped the address into an span element that has the mentionend class.
Finally I checked the same page for other languages, and found that has the same error. So I repeated the same process on all related files (for each different translation).
Related Issue -> [#14013]