Support » Plugin: AMP » Change the AMP lightbox background

  • Resolved alittlebitofnothing

    (@ecomonkey)


    A while ago I mocked up an idea for a mobile friendly site based on a static exhibition, that was closed due to COVID. I just resuscitated the project as a way to test AMP. It all works rather well, in many respects much better than I expected.

    I am unsure what the best way to get a white background for the AMP lightbox feature. I tried adding css to the customizer and then created a very simple child theme, now removed. There were a number of places (more than 1) that modifying the background-colour on screen worked. But I think this, which I can see in the inspector:

    i-amphtml-lbg-gallery, .i-amphtml-lbg-mask {
    background-color: #000 !important;
    position: absolute !important;
    }

    prevents me from changing the bg color. Adding this to the customizer

    html[amp] i-amphtml-lbg-gallery, .i-amphtml-lbg-mask {
    background-color: whitesmoke;
    }

    only works with !important, but will not stick.

    Can I change the bg color for the AMP lightbox?

    Keep up the good work

    Many thanks

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Weston Ruter

    (@westonruter)

    (Just a quick note to say that AMP doesn’t allow CSS style rules that target class names that begin with i-amphtml-.)

    Thread Starter alittlebitofnothing

    (@ecomonkey)

    Thank you for the info. Like the original model T Ford, you can have the AMP lightbox background in any colour, as long as it’s black …

    As we didn’t receive a response I’ll mark this as resolved. Feel free to open a new support topic if you require any further assistance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.