Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Caption is not cleared in version 3.5.4 #2150

Closed
acwolff opened this issue Dec 13, 2018 · 3 comments
Closed

Caption is not cleared in version 3.5.4 #2150

acwolff opened this issue Dec 13, 2018 · 3 comments

Comments

@acwolff
Copy link

acwolff commented Dec 13, 2018

If the first slide has a caption and the following slides don'n have a caption, the caption of the first slide is displayed under the 2nd and next slide. See here for an example: https://codepen.io/acwolff/pen/ebpoeq

@acwolff
Copy link
Author

acwolff commented Dec 13, 2018

Thanks for your quick fix, I can confirm that it works now correctly in version 3.5.5

However I have still problems with this css code:

@supports (padding: max(0px)) {
.fancybox-caption {
        padding: 75px max(44px, env(safe-area-inset-right)) max(25px, env(safe-area-inset-bottom)) max(44px, env(safe-area-inset-left));
    }
}

With that code I get on an iPhoneXR:
problem

To get it correct I changed it into:

@supports (padding: max(0px)) {
    .fancybox-caption {
        padding: 12px max(44px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(44px, env(safe-area-inset-left));
    }

}

In that case I see this:
ok

@fancyapps
Copy link
Owner

fancyapps commented Dec 13, 2018

That is how it works now - the top space allows to have a nice background gradient (in default design). Previously, that effect was archived using pseudo element, but the problem is that pseudo elements scroll, if element is scrollable, therefore caption now has inner element for actual content and outer element for background.

@acwolff
Copy link
Author

acwolff commented Dec 14, 2018

Well I think your solution is not working correctly:

With your solution I see on a PC:

pc-gradientl

and on an iPhone XR:
iphonefbsolution

Wy should I see a different view on a mobile phone?

With my solution

@pjdelport supports (padding: max(0px)) {
    .fancybox-caption { /* AW */
        padding: 12px max(44px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(44px, env(safe-area-inset-left));
    }
}

I get on the iPhone the same view as on a PC:

iphonemysolution

I did also this replacement:

/* Caption /
.fancybox-caption {
/
padding: 75px 44px 25px 44px AW replaced by: */
padding: 12px;

Repository owner locked and limited conversation to collaborators Dec 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants