From 873f94106a11e11bfab0184998421907dc6370c5 Mon Sep 17 00:00:00 2001 From: Paul Von Schrottky Date: Mon, 7 Dec 2020 19:02:28 -0300 Subject: [PATCH] Revert "Verse Block: Adds support for custom padding (#27341)" (#27561) This reverts commit a6e0b024355859adf4e8d609b0354b04c4bdc98f. --- .../developers/themes/theme-json.md | 1 - packages/block-library/src/verse/block.json | 17 +---------------- packages/block-library/src/verse/editor.scss | 1 + .../e2e-tests/fixtures/blocks/core__verse.html | 6 +++--- .../e2e-tests/fixtures/blocks/core__verse.json | 14 ++------------ .../fixtures/blocks/core__verse.parsed.json | 4 ++-- .../fixtures/blocks/core__verse.serialized.html | 2 +- 7 files changed, 10 insertions(+), 35 deletions(-) diff --git a/docs/designers-developers/developers/themes/theme-json.md b/docs/designers-developers/developers/themes/theme-json.md index 40519c2481b410..3f89813a103207 100644 --- a/docs/designers-developers/developers/themes/theme-json.md +++ b/docs/designers-developers/developers/themes/theme-json.md @@ -342,7 +342,6 @@ These are the current color properties supported by blocks: | --- | --- | | Cover | Yes | | Group | Yes | -| Verse | Yes | #### Typography Properties diff --git a/packages/block-library/src/verse/block.json b/packages/block-library/src/verse/block.json index 53304fcc26d2bf..77111fac4849c1 100644 --- a/packages/block-library/src/verse/block.json +++ b/packages/block-library/src/verse/block.json @@ -10,27 +10,12 @@ "default": "", "__unstablePreserveWhiteSpace": true }, - "style": { - "default": { - "spacing": { - "padding": { - "top": 20, - "right": 20, - "bottom": 20, - "left": 20 - } - } - } - }, "textAlign": { "type": "string" } }, "supports": { "anchor": true, - "__experimentalFontFamily": true, - "spacing": { - "padding": true - } + "__experimentalFontFamily": true } } diff --git a/packages/block-library/src/verse/editor.scss b/packages/block-library/src/verse/editor.scss index 038e84f500d031..737bfc159ffc9a 100644 --- a/packages/block-library/src/verse/editor.scss +++ b/packages/block-library/src/verse/editor.scss @@ -2,5 +2,6 @@ pre.wp-block-verse { color: $gray-900; white-space: nowrap; font-size: inherit; + padding: 1em; overflow: auto; } diff --git a/packages/e2e-tests/fixtures/blocks/core__verse.html b/packages/e2e-tests/fixtures/blocks/core__verse.html index 356fdcc7acf826..0e6904a898eadb 100644 --- a/packages/e2e-tests/fixtures/blocks/core__verse.html +++ b/packages/e2e-tests/fixtures/blocks/core__verse.html @@ -1,3 +1,3 @@ - -
A verse
And more!
- + +
A verse
And more!
+ diff --git a/packages/e2e-tests/fixtures/blocks/core__verse.json b/packages/e2e-tests/fixtures/blocks/core__verse.json index a3a1b520bef856..5c6e3d83e65162 100644 --- a/packages/e2e-tests/fixtures/blocks/core__verse.json +++ b/packages/e2e-tests/fixtures/blocks/core__verse.json @@ -4,19 +4,9 @@ "name": "core/verse", "isValid": true, "attributes": { - "content": "A verse
And more!", - "style": { - "spacing": { - "padding": { - "top": 20, - "right": 20, - "bottom": 20, - "left": 20 - } - } - } + "content": "A verse
And more!" }, "innerBlocks": [], - "originalContent": "
A verse
And more!
" + "originalContent": "
A verse
And more!
" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__verse.parsed.json b/packages/e2e-tests/fixtures/blocks/core__verse.parsed.json index d48a00c57513a7..2fbff3b1b326ed 100644 --- a/packages/e2e-tests/fixtures/blocks/core__verse.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__verse.parsed.json @@ -3,9 +3,9 @@ "blockName": "core/verse", "attrs": {}, "innerBlocks": [], - "innerHTML": "\n
A verse
And more!
\n", + "innerHTML": "\n
A verse
And more!
\n", "innerContent": [ - "\n
A verse
And more!
\n" + "\n
A verse
And more!
\n" ] }, { diff --git a/packages/e2e-tests/fixtures/blocks/core__verse.serialized.html b/packages/e2e-tests/fixtures/blocks/core__verse.serialized.html index 356fdcc7acf826..a601b259912a8e 100644 --- a/packages/e2e-tests/fixtures/blocks/core__verse.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__verse.serialized.html @@ -1,3 +1,3 @@ -
A verse
And more!
+
A verse
And more!