From 138ec53c9005a02def125af9ccae9b5e80c4771e Mon Sep 17 00:00:00 2001 From: Nick Diego Date: Fri, 26 Aug 2022 13:33:02 -0500 Subject: [PATCH] Add spacing support to the Calendar block. --- docs/reference-guides/core-blocks.md | 2 +- packages/block-library/src/calendar/block.json | 6 +++++- packages/block-library/src/calendar/style.scss | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index 3d2f9a11f91a2d..dd63d75fc83424 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -68,7 +68,7 @@ A calendar of your site’s posts. ([Source](https://github.com/WordPress/gutenb - **Name:** core/calendar - **Category:** widgets -- **Supports:** align +- **Supports:** align, spacing (margin, padding) - **Attributes:** month, year ## Categories List diff --git a/packages/block-library/src/calendar/block.json b/packages/block-library/src/calendar/block.json index 6f498ed585cd02..65ad35e6466e2f 100644 --- a/packages/block-library/src/calendar/block.json +++ b/packages/block-library/src/calendar/block.json @@ -16,7 +16,11 @@ } }, "supports": { - "align": true + "align": true, + "spacing": { + "margin": true, + "padding": true + } }, "style": "wp-block-calendar" } diff --git a/packages/block-library/src/calendar/style.scss b/packages/block-library/src/calendar/style.scss index 39df1e572d5b17..0b1720e0dd3b95 100644 --- a/packages/block-library/src/calendar/style.scss +++ b/packages/block-library/src/calendar/style.scss @@ -1,5 +1,7 @@ .wp-block-calendar { text-align: center; + // This block has customizable padding, border-box makes that more predictable. + box-sizing: border-box; th, tbody td {