Skip to content

Settings Closing "X" active box misalignment #3434

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

Closed
Leah123-d opened this issue Apr 5, 2025 · 3 comments · Fixed by #3439
Closed

Settings Closing "X" active box misalignment #3434

Leah123-d opened this issue Apr 5, 2025 · 3 comments · Fixed by #3439

Comments

@Leah123-d
Copy link

p5.js version

v2.15.9 (editor) v1.11.1 (p5.js file)

What is your operating system?

Mac OS

Web browser and version

133.0.6943.127

Actual Behavior

In Settings, when the closing "X" is clicked, the box that appears around is not centered around the "X".

Expected Behavior

When the closing "X" is clicked, the surrounding box should be center around the closing "X".

Image

Steps to reproduce

Steps:

  1. Open the P5 editor at this link
  2. Click the gear icon to the top right corner of the editor underneath the sign-up button
  3. In Settings, click the closing "X" in the top right corner
  4. Click and hold the closing "X" to see the box is not center around the "X"

Bug Preview:

Image

@Leah123-d Leah123-d added the Bug label Apr 5, 2025
Copy link

welcome bot commented Apr 5, 2025

Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already.

@Leah123-d
Copy link
Author

Using Dev Tools I was able to find that the closing "X" has padding on the left and none on the right.

Here is a photo example from Dev Tools:

Image

Here is the file and code line the CSS can be adjusted to remove the padding on the left.

.overlay__close-button {
  @include icon();
  padding: #{math.div(3, $base-font-size)}rem 0 #{math.div(3, $base-font-size)}rem #{math.div(10, $base-font-size)}rem;
}

Suggested Fix:

A suggested fix would be removing the padding to the left of the close button.

Below is an example of how the code will be adjusted.

.overlay__close-button {
  @include icon();
  padding: #{math.div(3, $base-font-size)}rem 0 #{math.div(3, $base-font-size)}rem;
}

@raclim
Copy link
Collaborator

raclim commented Apr 6, 2025

Thanks so much @Leah123-d for providing a really thorough dive into this issue and a suggested fix for it!

JoaoJoaoVF added a commit to JoaoJoaoVF/p5.js-web-editor that referenced this issue Apr 6, 2025
Adjusted the CSS to remove the extra left padding on the close button.
This ensures that the active box is centered around the 'X' when clicked.

- Removed left padding value from the padding property
- Verified alignment in both desktop and responsive view
mattbesancon added a commit to mattbesancon/p5.js-web-editor that referenced this issue Apr 7, 2025
karanBRAVO added a commit to karanBRAVO/p5.js-web-editor that referenced this issue Apr 10, 2025
raclim added a commit that referenced this issue Apr 10, 2025
[#3434] Remove left padding on overlay close button
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants