try responsive states for block instances #77736
Closed
tellthemachines wants to merge 45 commits into
Closed
Conversation
Replace the $found flag and double WP_HTML_Tag_Processor instantiation with a single processor using if/elseif branching. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…layout.php and position.php
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
…l-responsive-states Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
|
Size Change: +2.5 kB (+0.03%) Total Size: 7.82 MB 📦 View Changed
ℹ️ View Unchanged
|
21 tasks
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Very dodgy WIP glueing together #77513 and #76491 and adding support for responsive states on block instances.
This is just so we can have a play and see what is needed here.
Problems revealed in testing
the "Show state on canvas" toggle that Add supports for pseudo states on single block instances #76491 adds for pseudo selectors doesn't really make sense for responsive states, so instead we're outputting the styles in the editor and users can view them by either resizing the window or using the device previews.
currently we're only outputting responsive styles for block supports, but we'll need to support a bunch of custom settings like column numbers on Columns block (or at least reflowing to a given amount of columns - not actually changing the markup) so I'm guessing these will require individual, per-block adjustments.
layout doesn't work out of the box, neither does child layout. this is probably due to all the custom logic in layout to output multiple styles. Spacing styles seem to be saved per breakpoint but no CSS is output.
all the block supports that output inline styles don't work because the responsive styles are overridden by the inline ones. We could change them to output regular CSS or we could override them with
!important. Changing them to regular CSS is the preferred option if at all possible.Switching to a different style variation on a breakpoint doesn't work (should it? probably not. but then we should ensure we only show the controls that work when a breakpoint is set)
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast
Use of AI Tools