Site logo

[Resolved] hide-on* class disappearing when combined with another additional class

Home Forums Support [Resolved] hide-on* class disappearing when combined with another additional class

Home Forums Support hide-on* class disappearing when combined with another additional class

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2280883
    Lucie

    Added 3 items to a page and added the hide-on-mobile additional class to each item.
    The 1st item is a gallery that also has an additiional class called “masonry-gallery”. In this case, the hide-on-mobile does not work and is not even seen (as a class) when viewed with Inspector.

    The 2 other items, a headline and a plain gallery work as expected.

    Is there a way to get the hide-on-* class to be persistent when combined with the masonry-gallery class?

    #2280889
    Ying
    Staff
    Customer Support

    Hi Lucie,

    I did some testing, so it looks like when the masonry-gallery class is added, the gallery doesn’t accept other classes.

    I think it’s because themasonry-gallery class triggers a piece of JavaScript code which can modify the classes.

    Then, in this case, I would suggest wrapping a GB container outside the gallery block and adding the hide-on-*class to the GB container.

    #2280901
    Lucie

    Very clever, yes that worked. Thanks.

    #2280937
    Ying
    Staff
    Customer Support

    You are welcome 🙂

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