-
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.
Make Spacer block width adjustable and add it to Navigation block (#2…
…9133) * Make spacer width adjustable and add it to Nav block * regenerated fixtures for spacer block * Make spacer orientation depend on parent block. * Fix width and height output and revert fixture changes * Add fixture for horizontal option and specify 0 height * Adjust height for horizontal spacer. Co-authored-by: Andrei Draganescu <github@andreidraganescu.info>
- Loading branch information
1 parent
4cda494
commit 9111ad5
Showing
11 changed files
with
150 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,4 +27,8 @@ | |
.components-resizable-box__handle::before { | ||
content: none; | ||
} | ||
|
||
&.resize-horizontal { | ||
margin-bottom: 0; | ||
} | ||
} |
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
3 changes: 3 additions & 0 deletions
3
packages/e2e-tests/fixtures/blocks/core__spacer__horizontal.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,3 @@ | ||
<!-- wp:spacer {"height":0,"width":72} --> | ||
<div style="height:0px;width:72px" aria-hidden="true" class="wp-block-spacer"></div> | ||
<!-- /wp:spacer --> |
13 changes: 13 additions & 0 deletions
13
packages/e2e-tests/fixtures/blocks/core__spacer__horizontal.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,13 @@ | ||
[ | ||
{ | ||
"clientId": "_clientId_0", | ||
"name": "core/spacer", | ||
"isValid": true, | ||
"attributes": { | ||
"height": 0, | ||
"width": 72 | ||
}, | ||
"innerBlocks": [], | ||
"originalContent": "<div style=\"height:0px;width:72px\" aria-hidden=\"true\" class=\"wp-block-spacer\"></div>" | ||
} | ||
] |
14 changes: 14 additions & 0 deletions
14
packages/e2e-tests/fixtures/blocks/core__spacer__horizontal.parsed.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,14 @@ | ||
[ | ||
{ | ||
"blockName": "core/spacer", | ||
"attrs": { | ||
"height": 0, | ||
"width": 72 | ||
}, | ||
"innerBlocks": [], | ||
"innerHTML": "\n<div style=\"height:0px;width:72px\" aria-hidden=\"true\" class=\"wp-block-spacer\"></div>\n", | ||
"innerContent": [ | ||
"\n<div style=\"height:0px;width:72px\" aria-hidden=\"true\" class=\"wp-block-spacer\"></div>\n" | ||
] | ||
} | ||
] |
3 changes: 3 additions & 0 deletions
3
packages/e2e-tests/fixtures/blocks/core__spacer__horizontal.serialized.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,3 @@ | ||
<!-- wp:spacer {"height":0,"width":72} --> | ||
<div style="height:0;width:72px" aria-hidden="true" class="wp-block-spacer"></div> | ||
<!-- /wp:spacer --> |