WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.5k stars 4.2k forks source link

Add a z-index control for blocks where position is/can be set #60411

Open markhowellsmead opened 7 months ago

markhowellsmead commented 7 months ago

What problem does this address?

Several considerations and many use-cases, for example the stacking order of elements with negative margins (https://github.com/WordPress/gutenberg/pull/60347) or the use of multiple sticky blocks.

What is your proposed solution?

Add a control to allow a range of preset z-index options, with a switch for a free number field. (In comparison with existing padding, margin and block gap interface controls).

markhowellsmead commented 7 months ago

See also https://github.com/WordPress/gutenberg/issues/32644 and https://github.com/WordPress/gutenberg/pull/40464.

burnuser commented 7 months ago

Consider indicating (and maybe editing) the z-index in the List-View for the needed oversight and an efficient management of sticky/overlapping blocks.

altivero commented 6 months ago

I was very excited about creating a pattern with negative margins #60347 until I overlapped a cover with an overlay.

negative-margins-no-z-index

A pattern like this would be nice in the pattern library but doesn't seem possible without additional css or a z-index control.