You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This topic describes how to change the default mobile breakpoint in Page Builder.
4
4
5
-
## What's in this topic
5
+
## Default mobile breakpoint
6
6
7
-
This topic describes how to use your custom themes to control responsive layouts within Page Builder.
8
-
9
-
## Responsive Mobile Images
10
-
11
-
By default, when you configure Page Builder to render a background image for a container, it uses a mobile image when the container's width is less than the industry-standard max-width of 768px. This width is configured within `Magento_PageBuilder/etc/view.xml`, as follows:
7
+
By default, when you configure Page Builder to render a background image for a container, it uses a mobile image when the container's width is equal to and less than 768px. Page Builder defines this mobile breakpoint in the `Magento_PageBuilder/etc/view.xml` file, as shown here:
@@ -22,24 +21,32 @@ By default, when you configure Page Builder to render a background image for a c
22
21
</vars>
23
22
```
24
23
25
-
If your custom theme also uses this max-width breakpoint for your mobile layout, no additional configuration is required.
24
+
## Changing the mobile breakpoint
25
+
26
+
If your custom theme also uses this max-width breakpoint for your mobile layout, no changes are required.
27
+
28
+
However, if your custom theme uses a different mobile breakpoint, you need to overwrite the default breakpoint by either:
26
29
27
-
However, if your custom theme uses a different mobile breakpoint, you'll need to add that breakpoint (in pixels) to your theme's `view.xml` by including the following XML within the `<view />` node, and replacing `CUSTOM-BREAKPOINT` with the integer value of your theme's breakpoint, as follows:
30
+
1. Adding the theme's breakpoint to the theme's `view.xml` file.
31
+
2. Adding a `view.xml` file in the `etc` directory of your content type as shown here:
This directs Page Builder to use your theme's mobile breakpoint instead of its default breakpoint of 768px. Other responsive breakpoints from your custom theme can be added in the same way.
42
-
43
-
[Note: I think it might be nice to include another example or two of configuring other breakpoints (or other styles?) from custom themes as relevant.]
44
-
45
-
<!-- {% endraw %} -->
52
+
This directs Page Builder to use this mobile breakpoint instead of its default breakpoint of 768px. Other responsive breakpoints from your custom theme can be added in the same way.
0 commit comments