• Resolved Butterfingers

    (@cantbelieveitsnotbutter)


    To have the plugin work with layout.wideSize in theme.json, it would be useful to be able to set containers to alignwide using the block toolbar.

    For strip blocks, if the theme has layout.contentSize set, the strip is limited to that width unless the alignfull class is manually applied. While the editor CSS for the plugin contains a style of max-width: none for .wp-block-areoi-strip, this is overridden by layout.contentSize, and the block doesn’t have a max-width style for the front end. Using the alignfull class for the block for both the editor as well as the front end, with a fallback style such as max-width: none, seems like a good way to solve this.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Miles

    (@areoimiles)

    Hi @cantbelieveitsnotbutter

    Sorry for the late reply, it’s been a bit manic here. Let me have a look in to this. I will provide an update once I have one.

    Thanks

    Miles

    Thread Starter Butterfingers

    (@cantbelieveitsnotbutter)

    No worries and no hurries, @areoimiles! Thanks for taking a look at this and continuing to develop this great plugin.

    Plugin Author Miles

    (@areoimiles)

    Hi @cantbelieveitsnotbutter

    I have added the align functionality to the strip and container blocks within the latest release. Hopefully this is what you were after but any issues please don’t hesitate to get back in touch.

    Thanks

    Miles

    Thread Starter Butterfingers

    (@cantbelieveitsnotbutter)

    Hi @areoimiles,

    Thanks very much for this release! The new alignment functionality is very helpful.

    There are a couple tweaks which hopefully are easy to add to it:
    * Make the strip block’s alignment default to alignfull, based on its primary use case of “a full width div”.
    * For container blocks which are children of strip blocks, provide alignwide. Currently, the only alignment choice is “none”.

    Plugin Author Miles

    (@areoimiles)

    Hi @cantbelieveitsnotbutter

    I am currently working on some other updates so I will take a look at the same time and hopefully have a solution in the next release.

    Thanks

    Miles

    Thread Starter Butterfingers

    (@cantbelieveitsnotbutter)

    Thanks very much!

    Plugin Author Miles

    (@areoimiles)

    Hi @cantbelieveitsnotbutter

    I have released an update and was able to make the Strip block default to alignfull as you asked. I haven’t been able to resolve the other point about container blocks which are children of strip blocks.

    After doing some research I found that this functionality is intentional and has been implemented by the WordPress core team. There’s a long discussion about it here https://github.com/WordPress/gutenberg/issues/33374. I haven’t been able to find a workaround so I have had to leave as is. Apologies about this, I don’t agree with the WP teams decision on this but there isn’t anything I can do at this point.

    However, if you know of a workaround I would be happy to implement it.

    Thanks

    Miles

    Thread Starter Butterfingers

    (@cantbelieveitsnotbutter)

    Hi @areoimiles,

    Thanks very much for this update. It’s working great, and the additional utility class and color functionality is very nice.

    For setting alignwide, etc., for container blocks that are children of strip blocks, my guess is the solution is to add something for this to BlockControls and/or InspectorControls, to provide a convenient UI for toggling alignwide; basically, it’s the same as manually editing the “Additional CSS class(es)” field in the sidebar. My current workaround is just manually editing that field, but it would be convenient to have a more visible toggle.

    Plugin Author Miles

    (@areoimiles)

    Hi @cantbelieveitsnotbutter

    I have just released an update where you should now be able to select align wide and full for containers that are child blocks. When these are selected the additional class of alignwide or alignfull will be added to the container element.

    Hopefully, this solves your issue. If you have any other problems, please don’t hesitate to get back in touch.

    Thanks

    Miles

    Thread Starter Butterfingers

    (@cantbelieveitsnotbutter)

    This is great, @areoimiles. Thanks very much!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Feat Req: Align wide for containers, and align full for strips’ is closed to new replies.