magento2-page-builder
magento2-page-builder copied to clipboard
Hide elements on a page for just mobile
Is there a way to hide elements/objects for just mobile on a page?
Hi @oefterdal. Thank you for your report. To speed up processing of this issue, make sure that you provided sufficient information.
Add a comment to assign the issue: @magento I am working on this
- Join Magento Community Engineering Slack and ask your questions in #github channel.
As I customer we want to be able to show/hide content for desktop/mobile. I would suggest to add a dropdown with breakpoint options where the user can select where to display the component / row / column. One can manually add the magento responsive classes as a workaround but this can be a bit to complicated for the non experienced end users.
@amokato,
A similar issue has been reported in magento/magento2-page-builder#493. By "responsive classes", I presume you're referring to .pagebuilder-mobile-only
and .pagebuilder-mobile-hidden
?
As far as I know, Page Builder never generates inline stylesheets that contain media queries and, in my mind, nor should it. For example, if your theme has overridden @screen__m
and Page Builder is using out-of-the-box breakpoints, you wind up with a front-end with inconsistent breakpoints, so I guess finding a middle ground where such classes - or dare I suggest more data-*
attributes - are added based on responsive-based visibility toggling, configuration options added under Advanced Options, or an entirely new Responsive Options fieldset.