Browse Source

style(photoswipe): drop hard-coded image size caps and align zoom button with close button

Remove the 90vw/78vh caps so the image scales naturally inside the viewport, and apply the same 40x40 sizing to the zoom button as the close button.
pull/15787/head
Igor Kulikov 4 months ago
parent
commit
772a9cda7c
  1. 6
      ui-ngx/src/app/shared/directives/photoswipe-gallery.directive.ts

6
ui-ngx/src/app/shared/directives/photoswipe-gallery.directive.ts

@ -62,8 +62,6 @@ const PHOTO_GALLERY_STYLE =
'\n' +
'.pswp__item img.pswp__img {\n' +
' display: block;\n' +
' max-width: 90vw;\n' +
' max-height: 78vh;\n' +
' object-fit: contain;\n' +
' border-radius: 4px; \n' +
' box-shadow: 0 20px 60px #00000080;\n' +
@ -90,14 +88,14 @@ const PHOTO_GALLERY_STYLE =
' outline: none;\n' +
'}\n' +
'\n' +
'.pswp__button.pswp__button--close {\n' +
'.pswp__button.pswp__button--close, .pswp__button.pswp__button--zoom {\n' +
' width: 40px;\n' +
' height: 40px;\n' +
' margin-top: 16px;\n' +
' margin-right: 16px;\n' +
'}\n' +
'\n' +
'.pswp__button.pswp__button--close .pswp__icn {\n' +
'.pswp__button.pswp__button--close .pswp__icn, .pswp__button.pswp__button--zoom .pswp__icn {\n' +
' width: 24px;\n' +
' height: 24px;\n' +
' top: 7px;\n' +

Loading…
Cancel
Save