Hey guys,
we’re developing a tablet app based on ionic.
To have nice modals on tablets we applied some styles. As a result we have nice centered modals. The problem is that i need a backdrop behind the modals since they are not fullscreen anymore. The behavior should be the same as in action sheets.
Does someone know how i can achieve this without modifying ionic itself?
It works somehow if i change the styles a bit. It’s a bit ugly because the :before is relative to the modal.
It also overlays the content area of the modal. The solution used in ActionSheets is much better but i need an extra parent element for this.
Scroll below and you will see . @media (min-width: $modal-inset-mode-break-point) {
// inset mode is when the modal doesn’t fill the entire
// display but instead is centered within a large display
.modal {…
Make sure you remove .modal class that is in media query. If you don’t know what I’m taking about, look for the following and remove .modal {…} as showing below:
@media (min-width: $modal-inset-mode-break-point) {
// inset mode is when the modal doesn’t fill the entire
// display but instead is centered within a large display
.modal {
top: $modal-inset-mode-top;
right: $modal-inset-mode-right;
bottom: $modal-inset-mode-bottom;
left: $modal-inset-mode-left;
min-height: $modal-inset-mode-min-height;
width: (100% - $modal-inset-mode-left - $modal-inset-mode-right);
}