There is a use effect that sets all three breakpoints to the defaults, if you set them all to 100:
useEffect( () => { if ( heightLg ===
${ DEFAULT_SPACER_HEIGHT }${ DEFAULT_SPACER_HEIGHT_UNIT }
&& heightMd ===${ DEFAULT_SPACER_HEIGHT }${ DEFAULT_SPACER_HEIGHT_UNIT }
&& heightSm ===${ DEFAULT_SPACER_HEIGHT }${ DEFAULT_SPACER_HEIGHT_UNIT }
) { setAttributes( { heightLg: defaultValue.lg + defaultValue.lg_unit, heightMd: defaultValue.md + defaultValue.md_unit, heightSm: defaultValue.sm + defaultValue.sm_unit, } ); } // eslint-disable-next-line react-hooks/exhaustive-deps }, [] );
This means, it’s impossible to set them all to 100, because when you come back to edit, it resets it, and the next time you save, it will save to the defaults from the settings page.
In our case, we have mobile 20, tablet 40 and desktop 60.
If we set all three breakpoints to 100, it will revert to 20, 40 and 60 next time you visit editor, and when you resave, it saves the defaults instead of 100, 100, 100.
]]>I’m getting the following error repeating in the error log:
PHP Parse error: syntax error, unexpected ” (T_ENCAPSED_AND_WHITESPACE), expecting ‘-‘ or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /xx/xx/public_html/wp-content/plugins/flexible-spacer-block/classes/class-enqueue.php on line 151
Any ideas on what this could relate to. It doesn’t appear to be having any issues otherwise and the block appears to be acting normally.
Thanks!
]]>Can we select custom background color from editor
]]>Thanks for your plugin,
after WordPress update, there is a problem on editor screen where editor css overrides block heights and preview not representing real values.
.block-library-spacer__resize-container:not(.is-resizing) {
height: 100%!important;
width: 100%!important;
}
]]>
Hi,
To begin, thank you for your work on this plugin.
Could you make it possible to set the height to 0px ?
Currently, to make the spacer disappear, I have to set -1px (1px + negative space), and in some situations this can break the design.
Thank you
]]>I cannot activate the plugin. It says:
Plugin could not be activated because it triggered a fatal error.
Parse error: syntax error, unexpected ” (T_ENCAPSED_AND_WHITESPACE), expecting ‘-‘ or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /MY-LOCAL-INSTALL/wp-content/plugins/flexible-spacer-block/classes/class-enqueue.php on line 60
I am sorry i cannot provide further info…
]]>