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
| mobile-only | The block will be displayed on the screen if it is 781px wide or less. |
44
44
| desktop-only | The block will be displayed on the screen if the screen is at least 782px wide. |
45
45
@@ -52,7 +52,7 @@ Adding `is-position-fixed` to a block will make it fixed at the top of the scree
52
52
Additionally, `is-position-fixed--mobile-only` and `is-position-fixed--desktop-only` can be applied to blocks to fix their position based on the screen size.
| is-position-fixed | Class required to enable the fixed position. |
57
57
| is-position-fixed--mobile-only | The block will be fixed on the screen if it is 781px wide or less. |
58
58
| is-position-fixed--desktop-only | The block will be fixed on the screen if the screen is at least 782px wide. |
@@ -64,7 +64,7 @@ Adding `is-position-sticky` to a block will ensure it stays within the viewport
64
64
Additionally, `is-position-sticky--mobile-only` and `is-position-sticky--desktop-only` can be applied to blocks to make them sticky based on the screen size.
| is-position-sticky | Class required to enable the sticky position. |
69
69
| is-position-sticky--mobile-only | The block will be sticky on the screen if it is 781px wide or less. |
70
70
| is-position-sticky--desktop-only | The block will be sticky on the screen if the screen is at least 782px wide. |
@@ -73,15 +73,21 @@ Additionally, `is-position-sticky--mobile-only` and `is-position-sticky--desktop
73
73
74
74
The class `overlay-contents` needs to be applied along with a position class: `overlay-contents--position--left`, `overlay-contents--position--right`, or `overlay-contents--position--full-width`.
75
75
76
-
When using the right or left position, you can also control the width, which defaults to a maximum of 632px.
| overlay-contents | Class required to enable the overlay. |
81
-
| overlay-contents--position--left | This is the default behavior, where the content will appear from the left. |
82
-
| overlay-contents--position--right | In this case, the content will slide in from the right. |
83
-
| overlay-contents--position--full-width | The content will take over the full screen. |
84
-
| overlay-contents--width--x-small | The content will expand to a maximum of 300px. |
85
-
| overlay-contents--width--small | The content will expand to a maximum of 410px. |
86
-
| overlay-contents--width--large | The content will expand to a maximum of 964px. |
87
-
| overlay-contents--width--x-large | The content will expand to a maximum of 1296px. |
76
+
When the overlay contents are included via a template-part (e.g. mobile menu), the **parent** template-part wrapper can set a **force** position class (e.g. `overlay-contents--position--right--force` on the wrapper) to override the contents’ own position in JavaScript, without changing editor/front-end CSS. This lets patterns control slide direction without editing the shared template part.
77
+
78
+
When using the right or left position, you can also control the width; by default it uses `overlay-contents--width--medium`, where the content will expand to a maximum of 632px.
0 commit comments