Fix wish details image size

This commit is contained in:
grandeljay 2022-12-29 15:55:31 +01:00
parent c23007135e
commit 18731bc27a
2 changed files with 12 additions and 17 deletions

View file

@ -14,16 +14,13 @@
} }
/** Image */ /** Image */
.ui.modal.wish-details .wish-image, .ui.modal.wish-details .wish-image {
.ui.modal.wish-details .wish-image is:(img, svg) { width: 100%;
height: auto;
max-width: 100%;
max-height: 40vh; max-height: 40vh;
} }
@media (min-width: 768px) { @media (min-width: 768px) {
.ui.modal.wish-details .wish-image { .ui.modal.wish-details .wish-image {
max-width: 40%; width: 40%;
max-height: 100%; max-height: 100%;
} }
} }
@ -33,14 +30,9 @@
} }
} }
.ui.modal.wish-details .wish-image:has(.ui.placeholder) { .ui.modal.wish-details .wish-image :is(img, svg) {
height: 40vh; max-height: inherit;
width: 100%; margin: auto;
}
@media (min-width: 768px) {
.ui.modal.wish-details .wish-image:has(.ui.placeholder) {
width: 40%;
}
} }
/** Placeholder */ /** Placeholder */
@ -49,8 +41,11 @@
} }
/** Description */ /** Description */
.ui.modal.wish-details .wish-image:has(.ui.placeholder) + .description { .ui.modal.wish-details .description.description {
width: 100%; width: 100%;
}
.ui.modal.wish-details .wish-image + .description {
padding-left: 2em; padding-left: 2em;
} }

View file

@ -33,10 +33,10 @@ $(function () {
wish_details wish_details
.modal({ .modal({
'onVisible' : function() { 'onVisible' : function() {
/** Dirty hack to change the default display: block to flex. */ /** Dirty hack to change the default display: block to display: flex. */
setTimeout(() => { setTimeout(() => {
$(this).css('display', ''); $(this).css('display', '');
}, 1000); }, 0);
}, },
'onHide' : function(modal) { 'onHide' : function(modal) {
wish_unset(); wish_unset();