From ceb625d26974279453f3c2dd1d3616e792c4a4d6 Mon Sep 17 00:00:00 2001 From: Tony Air Date: Sun, 30 Aug 2020 01:35:17 +0700 Subject: [PATCH] FIX: AJAX styling --- package.json | 2 +- src/js/meta-lightbox.js | 8 ++++---- src/scss/_variables.scss | 1 + src/scss/meta-lightbox.scss | 4 ++++ 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 9c5921d..2fad860 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@a2nt/meta-lightbox", - "version": "2.2.4", + "version": "2.2.5", "description": "Universal Lightbox window", "main": "meta-lightbox.js", "author": "Tony Air ", diff --git a/src/js/meta-lightbox.js b/src/js/meta-lightbox.js index 335aa41..1926f33 100755 --- a/src/js/meta-lightbox.js +++ b/src/js/meta-lightbox.js @@ -474,7 +474,7 @@ const MetaLightboxUI = (($) => { } // Vertically center html - if (wrap.outerHeight() < ui.$content.height()) { + /*if (wrap.outerHeight() < ui.$content.height()) { wrap.css({ position: 'relative', top: '50%', @@ -489,9 +489,9 @@ const MetaLightboxUI = (($) => { 'margin-top': `${-(wrap.outerHeight() / 2)}px`, }); } - }); + });*/ - setTimeout(() => { + /*setTimeout(() => { $(window).resize(); if (typeof window.imagesLoaded === 'function') { @@ -499,7 +499,7 @@ const MetaLightboxUI = (($) => { $(window).resize(); }); } - }, 500); + }, 500);*/ ui.contentLoaded(); }, diff --git a/src/scss/_variables.scss b/src/scss/_variables.scss index 28df8ce..7f756a0 100755 --- a/src/scss/_variables.scss +++ b/src/scss/_variables.scss @@ -2,6 +2,7 @@ $white: #fff !default; $black: #000 !default; $lightbox-link-hover-color: #007bff !default; $lightbox-breakpoint: 576px !default; +$body-color: #212529 !default; $grid-breakpoints: ( xs: 0, diff --git a/src/scss/meta-lightbox.scss b/src/scss/meta-lightbox.scss index 2f76458..d38ced8 100755 --- a/src/scss/meta-lightbox.scss +++ b/src/scss/meta-lightbox.scss @@ -36,6 +36,10 @@ width: 100%; height: 100%; + .meta-lightbox-ajax { + color: $body-color; + } + .meta-lightbox-zoom-wrapper { display: block; height: 100%;