From 3169cf98c10eb579df160ab1291ffad7957791dc Mon Sep 17 00:00:00 2001 From: Andrew Serong <14988353+andrewserong@users.noreply.github.com> Date: Mon, 22 Aug 2022 10:48:01 +1000 Subject: [PATCH] Post Date: Add spacing support (#43406) --- docs/reference-guides/core-blocks.md | 2 +- packages/block-library/src/post-date/block.json | 4 ++++ packages/block-library/src/post-date/style.scss | 4 ++++ packages/block-library/src/style.scss | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 packages/block-library/src/post-date/style.scss diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index 02fe1e962d104..79bea8ee821fc 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -527,7 +527,7 @@ Add the date of this post. ([Source](https://github.com/WordPress/gutenberg/tree - **Name:** core/post-date - **Category:** theme -- **Supports:** color (background, gradients, link, text), typography (fontSize, lineHeight), ~~html~~ +- **Supports:** color (background, gradients, link, text), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ - **Attributes:** displayType, format, isLink, textAlign ## Post Excerpt diff --git a/packages/block-library/src/post-date/block.json b/packages/block-library/src/post-date/block.json index 3d6d15224790e..b469dbe87d7e0 100644 --- a/packages/block-library/src/post-date/block.json +++ b/packages/block-library/src/post-date/block.json @@ -34,6 +34,10 @@ "link": true } }, + "spacing": { + "margin": true, + "padding": true + }, "typography": { "fontSize": true, "lineHeight": true, diff --git a/packages/block-library/src/post-date/style.scss b/packages/block-library/src/post-date/style.scss new file mode 100644 index 0000000000000..59d1b0dfd3ed0 --- /dev/null +++ b/packages/block-library/src/post-date/style.scss @@ -0,0 +1,4 @@ +.wp-block-post-date { + // This block has customizable padding, border-box makes that more predictable. + box-sizing: border-box; +} diff --git a/packages/block-library/src/style.scss b/packages/block-library/src/style.scss index e3b021f2d7a38..1b63505027084 100644 --- a/packages/block-library/src/style.scss +++ b/packages/block-library/src/style.scss @@ -27,6 +27,7 @@ @import "./paragraph/style.scss"; @import "./post-author/style.scss"; @import "./post-comments-form/style.scss"; +@import "./post-date/style.scss"; @import "./post-excerpt/style.scss"; @import "./post-featured-image/style.scss"; @import "./post-terms/style.scss";