Fixed
Project:
GLightbox
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
24 Nov 2026 at 22:03 UTC
Updated:
25 Nov 2026 at 16:34 UTC
Jump to comment: Most recent
I'm using GLightbox with EPT Image Gallery and would like an option in the settings form to choose a skin name. This would make it easier to apply site-specific styling to the lightbox including navigation and close controls.
The JavaScript library supports a skin option that adds a CSS class to the lightbox. The existing hook_glightbox_settings_alter() can supply this in code.
Add a Skin text field under Custom options and pass the value to Glightbox's skin option. Use GLightbox’s existing default skin (clean) when no custom skin name is entered. Help text could explain that the site's theme supplies the custom CSS.
I used AI to double check my work / check the existing settings.
Comments
Comment #2
bdunphy commentedComment #4
levmyshkinThanks for the clear proposal, @bdunphy. This is committed to 1.0.x (250297c) and released in GLightbox 1.0.22.
What changed:
skinoption, which adds the classglightbox-SKINto the lightbox. An empty value falls back to the library's defaultcleanskin.cleanis styled by the GLightbox library, so any other skin needs CSS from your theme.glightbox_update_10001()addsskin: cleanto existing sites, so please rundrush updbafter updating.config:glightbox.settingscache tag. That tag is now added, so a new skin (or any other setting) applies as soon as you save the form.Example: select "Custom" options, enter
darkas the skin, and style.glightbox-darkin your theme. You no longer needhook_glightbox_settings_alter()for this.Kernel and functional tests cover the new setting, and I checked it manually with an EPT Image Gallery paragraph.
Comment #6
bdunphy commented@levmyshkin - thank you so much for adding this feature.