Skip to content

Commit

Permalink
Table of contents: Add border block support (#63578)
Browse files Browse the repository at this point in the history
* Add border support to table of contents block

* Add box sizing style to table of contents block

Co-authored-by: akasunil <[email protected]>
Co-authored-by: aaronrobertshaw <[email protected]>
  • Loading branch information
3 people authored Jul 29, 2024
1 parent 1eade38 commit d803b3f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/block-library/src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
@import "./spacer/style.scss";
@import "./tag-cloud/style.scss";
@import "./table/style.scss";
@import "./table-of-contents/style.scss";
@import "./term-description/style.scss";
@import "./text-columns/style.scss";
@import "./verse/style.scss";
Expand Down
15 changes: 14 additions & 1 deletion packages/block-library/src/table-of-contents/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,20 @@
},
"interactivity": {
"clientNavigation": true
},
"__experimentalBorder": {
"radius": true,
"color": true,
"width": true,
"style": true,
"__experimentalDefaultControls": {
"radius": true,
"color": true,
"width": true,
"style": true
}
}
},
"example": {}
"example": {},
"style": "wp-block-table-of-contents"
}
4 changes: 4 additions & 0 deletions packages/block-library/src/table-of-contents/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
:root :where(.wp-block-table-of-contents) {
// This block has customizable padding, border-box makes that more predictable.
box-sizing: border-box;
}

1 comment on commit d803b3f

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in d803b3f.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/10141883197
📝 Reported issues:

Please sign in to comment.