Inspector Options of the Sticky Block (as of v1.11)
- Space between sticky block and top of screen:
<num-field>
- ☑︎ Move the block down a little bit if there is a toolbar at the top (for logged in users)
- Block should not be sticky on screens smaller than:
<num-field> (default 0)
- Block should not be sticky on screens wider than:
<num-field> (default 99999)
- Pushup Element:
<text field> to be filled with an ID or class name
Improvements & Additions here
Ad 1: Should be a text field and accept any CSS value, also e.g. var(--wp--preset--spacing--30)
Ad 3+4: Combine this more elegantly into one label + two num-fields:
Block is sticky on viewport-widths between
Min: [ 0 ] Max: [ 99999 ]
6: Please add spacing options:
- Minimally at least
margin-bottom, which is the space between the sticky block and the pushup element, the conceptual counterpart to “Space between sticky block and top of screen”.
- Ideally the same dimension control as the native blocks (slider for the theme.json fluid sizes which can altenratively also be set to any other CSS dimension (px, pc, em, rem, vh, vw) ).
Workarounds
Are possible luckily (but not elegant though):
- Set the spacing on the wrapped block. But not all those blocks have adequate spacing settings themselves! E.g. the Gutenslider block has margin-top-bottom combined (not margin-bottom alone).
- Deep nesting like: Sticky block (without spacing options) → Group block (with your spacing as desired) → Certain content block (incapable of spacing).
Inspector Options of the Sticky Block (as of v1.11)
<num-field><num-field>(default 0)<num-field>(default 99999)<text field>to be filled with an ID or class nameImprovements & Additions here
Ad 1: Should be a text field and accept any CSS value, also e.g.
var(--wp--preset--spacing--30)Ad 3+4: Combine this more elegantly into one label + two num-fields:
6: Please add spacing options:
margin-bottom, which is the space between the sticky block and the pushup element, the conceptual counterpart to “Space between sticky block and top of screen”.Workarounds
Are possible luckily (but not elegant though):