[wp-trac] [WordPress Trac] #64414: Block visibility based on screen size: add backend block support

WordPress Trac noreply at wordpress.org
Mon Dec 15 01:19:05 UTC 2025


#64414: Block visibility based on screen size: add backend block support
--------------------------+-----------------------------
 Reporter:  ramonopoly    |      Owner:  ramonopoly
     Type:  defect (bug)  |     Status:  assigned
 Priority:  normal        |  Milestone:  7.0
Component:  Editor        |    Version:  trunk
 Severity:  normal        |   Keywords:  gutenberg-merge
  Focuses:                |
--------------------------+-----------------------------
 WordPress 7.0 with build upon the block visibility block support
 introduced in 6.9, with functionality to allow hiding a block based on
 screen size.

 Here are the relevant issues:


 - [https://github.com/WordPress/gutenberg/issues/19909 Add option to hide
 blocks based on screen size]
 - [https://github.com/WordPress/gutenberg/issues/72502 Responsive
 previewing and device-specific editing]

 To that end, the backend block supports capability needs to be implemented
 with the following scope:

 **Block visibility block supports**: Define and document the
 blockVisibility attribute to support both boolean (hide everywhere) and
 object format (per-device visibility). Define breakpoints constants
 consistent with those in the editor.

 **Frontend CSS output**:  Create PHP block support that generates CSS
 media queries and applies .wp-block-hidden-[device] classes to blocks
 based on their visibility settings.

 A [https://github.com/WordPress/gutenberg/pull/73994 corresponding
 Gutenberg patch exists] to guide development.


 See also:

 - [https://github.com/WordPress/gutenberg/issues/73776 WordPress 7.0:
 iteration issue for add option to hide blocks based on screen size]
 - [https://make.wordpress.org/core/2025/12/11/planning-for-7-0/ Make Core
 post planning for 7.0]

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64414>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list