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

Close button position #85

Open
viliusle opened this issue Aug 31, 2021 · 4 comments
Open

Close button position #85

viliusle opened this issue Aug 31, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@viliusle
Copy link
Collaborator

viliusle commented Aug 31, 2021

In most cases close button in top-right corner works. But not in all cases. If we have lots of small images or using inline HTML feature (modal window will be small) or having big screen, close button should be closer to actual content. User focus will be in center, and to exit, he will need to waste time searching for close button and move mouse to close button.

The problem, it is hard to achieve it even with custom CSS, because current HTML layout will not let you do this easily. We should try to find a way to solve it.

p.s. I am not suggest to change it globally, but to have such ability with data- attribute. It would probably be breaking change.

@midzer
Copy link
Owner

midzer commented Dec 10, 2021

Do you think about having something like data-position="top-left" for each element to set the close button position? This would mean we can override current close button css via JavaScript. What positions do you want to offer?

If we leave top-right as default, there would be no breaking change, as it is just optional.

@midzer midzer added the enhancement New feature or request label Dec 10, 2021
@viliusle
Copy link
Collaborator Author

Possible values would be only 2, I do not see why we should add more options.

  • absolute top-left (default, current)
  • relative top-left (right above image top right corner)

@midzer
Copy link
Owner

midzer commented Apr 22, 2022

Yeah, if you need this feature @viliusle just open up a PR and we can discuss the changes.

@viliusle
Copy link
Collaborator Author

I do not need it anymore, because I found a way using hacky CSS, but problem remains. Still it is hard to fix it in current version, so low priority I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants