kazzkiq / balloon.css

Simple tooltips made of pure CSS
https://kazzkiq.github.io/balloon.css/
MIT License
5.03k stars 448 forks source link

Tooltip cut offs when scrolling enabled #92

Closed vasyl-shumskyi closed 6 years ago

vasyl-shumskyi commented 6 years ago

Hello,

I have 2 stacked elements modal-header and modal-body wrapped in modal-content.

Tooltip cut offs on modal-header when scrolling enabled for modal-body via overflow-y: auto.

screen shot 2018-01-19 at 16 13 06

If overflow-y: auto gets removed its working as expected. But modal-body contains lots of data so it needs scrolling.

Style looks like the following:

/* Modal Content */
.modal-content {
    position: fixed;
    bottom: 0;
    background-color: #fefefe;
    width: 100%;
    -webkit-animation-name: slideIn;
    -webkit-animation-duration: 0.4s;
    animation-name: slideIn;
    animation-duration: 0.4s;
}

.modal-header {
    padding: 2px 16px;
    background-color: rgb(217,77,68);
    color: white;
    min-height: 24px;
    opacity: 0.9;
    text-align: center;
}

.modal-body { 
    padding: 15px; 
    text-align: center !important;
    /* height: 224px; */
    min-height: 224px;

    /* scrolling */
    overflow-y: auto;
    position: relative;
    max-height: 82vh;
}

Kindly assist.

kazzkiq commented 6 years ago

Its not possible to show elements outside of a parent element with overflow: scroll|hidden. They simply get cropped. Its how W3C specified it.

vasyl-shumskyi commented 6 years ago

Got it. Thanks! :)