Archived topic
hide-on* class disappearing when combined with another additional class
3 replies · Started by Lucie on July 12, 2022
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?
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.
Very clever, yes that worked. Thanks.
You are welcome :)