Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Plugins

Maximum size for image in FeatherLight lightbox

Started by Geoffrey Troyer 9 years ago · 6 replies · 2279 views
9 years ago

I am using the FeatherLight Grav plugin for lightboxes in the antimatter theme. I would prefer for people not to have to scroll in lower resolutions, but I want to keep the image full screen for larger resolutions. I tried and failed using grids and CSS styling to do that. Is there any way to have a maximum size relative to screen size within the lightbox so that scroll bars are not necessary? And it still shows at full screen in larger resolutions?

edit: I guess I'm looking for a responsive size, like width equal to a percentage of the screen. I'll try with css again tonight.

last edited 07/11/17 by Geoffrey Troyer
9 years ago

Alright, I was a bit mistaken in my first post. Looks like it is supposed to be responsive automatically. But I am not getting a vertical scroll bar at 2560x1440 resolution. Other resolutions I do get a vertical scroll bar. It looks like this issue here: https://github.com/noelboss/featherlight/issues/43. I'm probably not savvy enough to come up with a solution.

9 years ago

Looks like the version of featherlight in the plugin is 1.3.2. The latest version of featherlight appears to be 1.7.6. An upgrade might help me. Not sure if I can just plug the new version in somehow.

9 years ago

vh units seem to do the trick for me:

.featherlight-image {
max-height: 87vh;
}

9 years ago

The latest update in the grav featerlight plugin fixes it. (version 1.5 I think)

9 years ago

Yes, I think that an update to featherlight plugin is in order. I'll try to get to that soon.

9 years ago

Thank you for your concern. I think there was a recent update (1.5) to the featherlight plugin by flaviocopes that added featherlight version 1.7.7. My problems are solved. Perhaps I misunderstand what you mean.

Suggested topics

Topic Participants Replies Views Activity
Plugins · by Rene, 1 week ago
2 43 1 week ago
Plugins · by Xavier, 4 weeks ago
2 53 4 weeks ago
Plugins · by Luka Prinčič, 7 years ago
3 1179 1 month ago
Plugins · by Sebastian van de Meer, 1 month ago
1 47 1 month ago
Plugins · by PIERROT Alain, 2 months ago
3 71 2 months ago