Button strange behavior

Description:

the width and height of button block behaves weirdly.
I don’t know how to get a simple normal button
Step-by-step reproduction instructions:

Please write the steps needed to reproduce the bug.

  1. Open the Post Editor/Site Editor
  2. add a container
  3. add a button inside a container
  4. add a background to the button
  5. see that the button takes automatically the full width of the container
  6. set the container to flex, direction horizontal, with a 500px height
  7. see that the button is no longer full width but full height

Screenshots, screen recording, code snippet

Insert Images, Videos or GIFs

Environment info

  • WordPress version: 6.7.1
  • Cwicly Plugin version: 1.4.1.8

Hi @flora,

This is expected behaviour with flex layouts.

You can see exactly what makes the difference by changing the alignment and justification properties between flex-start and stretch for example.

If you switch between horizontal and vertical directions and change these properties it should also reveal what is going on.

Hi, thank you for your reply. Is there a way to get just a button for basic needs? I work sometimes with zion builder for example, or Greenshift, or Elementor , using flexbox, they have simple buttons which respond to parent containers aligments without changing their layouts. This behavior is really confusing for me, it doesn’t act as a button