• Resolved helenes13

    (@helenes13)


    Hello
    I have added the free plugin “Lightbox with PhotoSwipe”. The pictures opening on click works fine BUT the window opens with a black background. I haven’t found anywhere a field to custom so that I can change it. Does someone have the solution. Is there a button somewhere ? Some code to add somewhere ? Or something only possible with the charged version ?
    Thanks in advance for your help.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Arno Welzel

    (@awelzel)

    There is no special version of the plugin. If you want to change the background, just add custom CSS rules to your site. For example to have a grey background (#404040):

    
    .pswp__bg {
        background: #404040 !important;
    }
    
    .pswp__ui–fit .pswp__top-bar,
    .pswp__ui–fit .pswp__caption {
        background-color: rgba(64, 64, 64, 0.7) !important;
    }
    
    .pswp__button–arrow–left::before,
    .pswp__button–arrow–right::before {
        background-color: rgba(64, 64, 64, 0.7) !important;
    }
    
    Thread Starter helenes13

    (@helenes13)

    Thank you Arno.
    Where do I add this code, in the global CSS field of the wole site, in the right upper CSS field in each page, or somewhere else ?

    Plugin Author Arno Welzel

    (@awelzel)

    You can either add this to the global theme customization of WordPress or you create a child theme and put that to the style.css files of the child theme.

    Thread Starter helenes13

    (@helenes13)

    Thank you so much.

    Thread Starter helenes13

    (@helenes13)

    It works fine ! Thanks again !

    I would like to color the arrows and other controls.
    I tried the CSS, and can change the background of the slideshow, and the background on hover of the controls, but not the controls themselves.

    Tried changing the PNG too…

    Plugin Author Arno Welzel

    (@awelzel)

    Everything is in the CSS, also see here:

    https://github.com/arnowelzel/lightbox-photoswipe/blob/3.1.5/src/lib/photoswipe.css

    https://github.com/arnowelzel/lightbox-photoswipe/blob/3.1.5/src/lib/skins/default/skin.css

    Just keep in mind, that the plugin uses a minified CSS which contains everything in one file and with the images encoded as data urls. If possible, the buttons don’t use PNG but SVG for better visual quality.

    Plugin Author Arno Welzel

    (@awelzel)

    To change the color of the controls, you might use a CSS color filter as well:

    
    .pswp__button {
        filter: invert(10%) sepia(100%) hue-rotate(-60deg) saturate(120);
    }
    

    Just try different value combinations.

    Thread Starter helenes13

    (@helenes13)

    Since the beginning of this post, I have removed this plugin for simple lightbox, easier for me.
    Thanks for the help.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Custom background with free “Lightbox with PhotoSwipe”’ is closed to new replies.