notiflix / Notiflix

Notiflix is a pure JavaScript library for client-side non-blocking notifications, popup boxes, loading indicators, and more that makes your web projects much better.
https://notiflix.github.io
MIT License
635 stars 55 forks source link

Fix Block Module changing height of element #50

Closed snow3461 closed 2 years ago

snow3461 commented 2 years ago

Hi there,

This PR is to fix a problem I encountered using Notiflix Block module. That is to prevent unwanted resizing of element on which the "blocking" is applied. It also changes block svg display style to 'block' to respect its height attribute, and thus vertical centering issues.

Let me know if anything seems off, or if I didn't get the big picture and that PR is gonna cause problems.

furcan commented 2 years ago

Hi,

The Block module is changing the element height temporarily in the safest way if the SVG icon(and the message element if exists) is not fitting inside of the element.

You can create an issue with your init code, output images and/or code examples if you are having an issue with this functionality, instead of removing the code block.

Or, you can fork this repo and modify the code as you wanted as well.

I am closing this PR.

Thanks.

snow3461 commented 2 years ago

Hi,

First of all, I apologize if this PR was a bit blunt... Maybe I should have posted an issue before to discuss the problem. I found a fix of my problem, and rushed the PR I guess.

I think my use case was not intended and that's why I encounter problems. I will try and write a minimal non-working example for you to look at later, and post an issue.

Have a good day.

furcan commented 2 years ago

Hi @snow3461

No worries 🙏 You are welcome 😊

Yes, it would be nice to create an issue with some visual examples to see the full picture.

Thanks in advance. Furkan.