processing / p5.js-web-editor

The p5.js Editor is a website for creating p5.js sketches, with a focus on making coding accessible and inclusive for artists, designers, educators, beginners, and anyone else! You can create, share, or remix p5.js sketches without needing to download or configure anything.
https://editor.p5js.org
GNU Lesser General Public License v2.1
1.38k stars 1.32k forks source link

Resolve content overflow issue on mobile devices in keyboard shortcuts modal #2868

Closed arpitghura closed 6 months ago

arpitghura commented 9 months ago

Fixes #2866

Changes:

  1. max-width: #{500 / $base-font-size}rem; on line 5, which makes the content in the list items have a maximum width instead of a width. This prevents the overflow of content on smaller screen sizes. Below is the attached screenshot of this:

Before

image

After

image

  1. min-inline-size: max-content; on line 27 makes the keyboard shortcut command always have the max-content width, which means the content will not wrap on smaller screen sizes.

Before

image

After

image

The second change is not particularly intended for the issue, but this can improve the readability. If you don't want this change, I will remove it.

I have verified that this pull request:

welcome[bot] commented 9 months ago

🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already.

lindapaiste commented 9 months ago
  1. min-inline-size: max-content; on line 27 makes the keyboard shortcut command always have the max-content width, which means the content will not wrap on smaller screen sizes.

Before

image

After

image

The second change is not particularly intended for the issue, but this can improve the readability. If you don't want this change, I will remove it.

I really like this!

raclim commented 6 months ago

Closing due to reasons laid out on https://github.com/processing/p5.js-web-editor/issues/2866#issuecomment-2027397824, but definitely wouldn't have been able to get there without your suggestions and finding the issue!