-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Columns block: Add stack on mobile setting to allow for columns witho…
…ut mobile breakpoints (#31816) * Columns block: Add stack on mobile setting * Update selector to specify the direct child * Fix deprecations to include the new attribute, add another set of test fixtures * Add nowrap to is-not-stacked-on-mobile Co-authored-by: Andrew Serong <[email protected]>
- Loading branch information
1 parent
63cee9a
commit 3e11313
Showing
11 changed files
with
315 additions
and
54 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
24 changes: 24 additions & 0 deletions
24
packages/e2e-tests/fixtures/blocks/core__columns__is-not-stacked-on-mobile.html
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!-- wp:columns {"isStackedOnMobile":false,"backgroundColor":"secondary"} --> | ||
<div class="wp-block-columns is-not-stacked-on-mobile has-secondary-background-color has-background"> | ||
<!-- wp:column --> | ||
<div class="wp-block-column"> | ||
<!-- wp:paragraph --> | ||
<p>Column One, Paragraph One</p> | ||
<!-- /wp:paragraph --> | ||
<!-- wp:paragraph --> | ||
<p>Column One, Paragraph Two</p> | ||
<!-- /wp:paragraph --> | ||
</div> | ||
<!-- /wp:column --> | ||
<!-- wp:column --> | ||
<div class="wp-block-column"> | ||
<!-- wp:paragraph --> | ||
<p>Column Two, Paragraph One</p> | ||
<!-- /wp:paragraph --> | ||
<!-- wp:paragraph --> | ||
<p>Column Three, Paragraph One</p> | ||
<!-- /wp:paragraph --> | ||
</div> | ||
<!-- /wp:column --> | ||
</div> | ||
<!-- /wp:columns --> |
76 changes: 76 additions & 0 deletions
76
packages/e2e-tests/fixtures/blocks/core__columns__is-not-stacked-on-mobile.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
[ | ||
{ | ||
"clientId": "_clientId_0", | ||
"name": "core/columns", | ||
"isValid": true, | ||
"attributes": { | ||
"isStackedOnMobile": false, | ||
"backgroundColor": "secondary" | ||
}, | ||
"innerBlocks": [ | ||
{ | ||
"clientId": "_clientId_0", | ||
"name": "core/column", | ||
"isValid": true, | ||
"attributes": {}, | ||
"innerBlocks": [ | ||
{ | ||
"clientId": "_clientId_0", | ||
"name": "core/paragraph", | ||
"isValid": true, | ||
"attributes": { | ||
"content": "Column One, Paragraph One", | ||
"dropCap": false | ||
}, | ||
"innerBlocks": [], | ||
"originalContent": "<p>Column One, Paragraph One</p>" | ||
}, | ||
{ | ||
"clientId": "_clientId_1", | ||
"name": "core/paragraph", | ||
"isValid": true, | ||
"attributes": { | ||
"content": "Column One, Paragraph Two", | ||
"dropCap": false | ||
}, | ||
"innerBlocks": [], | ||
"originalContent": "<p>Column One, Paragraph Two</p>" | ||
} | ||
], | ||
"originalContent": "<div class=\"wp-block-column\">\n\t\t\n\t\t\n\t</div>" | ||
}, | ||
{ | ||
"clientId": "_clientId_1", | ||
"name": "core/column", | ||
"isValid": true, | ||
"attributes": {}, | ||
"innerBlocks": [ | ||
{ | ||
"clientId": "_clientId_0", | ||
"name": "core/paragraph", | ||
"isValid": true, | ||
"attributes": { | ||
"content": "Column Two, Paragraph One", | ||
"dropCap": false | ||
}, | ||
"innerBlocks": [], | ||
"originalContent": "<p>Column Two, Paragraph One</p>" | ||
}, | ||
{ | ||
"clientId": "_clientId_1", | ||
"name": "core/paragraph", | ||
"isValid": true, | ||
"attributes": { | ||
"content": "Column Three, Paragraph One", | ||
"dropCap": false | ||
}, | ||
"innerBlocks": [], | ||
"originalContent": "<p>Column Three, Paragraph One</p>" | ||
} | ||
], | ||
"originalContent": "<div class=\"wp-block-column\">\n\t\t\n\t\t\n\t</div>" | ||
} | ||
], | ||
"originalContent": "<div class=\"wp-block-columns is-not-stacked-on-mobile has-secondary-background-color has-background\">\n\t\n\t\n</div>" | ||
} | ||
] |
Oops, something went wrong.