From ee899905d47662772d41f22a149bd6a145c47a8a Mon Sep 17 00:00:00 2001 From: jasmussen Date: Thu, 11 Mar 2021 13:12:07 +0100 Subject: [PATCH] Try: Allow space between on page list. --- packages/block-library/src/page-list/editor.scss | 16 ++++++++++++++++ packages/block-library/src/page-list/style.scss | 8 ++++++++ 2 files changed, 24 insertions(+) diff --git a/packages/block-library/src/page-list/editor.scss b/packages/block-library/src/page-list/editor.scss index fd6b7f5eee483c..5a032e893fe03f 100644 --- a/packages/block-library/src/page-list/editor.scss +++ b/packages/block-library/src/page-list/editor.scss @@ -4,6 +4,7 @@ .wp-block-page-list { background-color: inherit; } + // Make the dropdown background white if there's no background color set. &:not(.has-background) { .submenu-container { @@ -11,6 +12,21 @@ background-color: $white; } } + + // space-between justification. + &.items-justified-space-between { + .wp-block-page-list > div, + .wp-block-page-list { + flex: 1; + } + + &.has-child-selected .wp-block-page-list > div, + &.has-child-selected .wp-block-page-list, + &.is-selected .wp-block-page-list > div, + &.is-selected .wp-block-page-list { + flex: inherit; + } + } } // Make links unclickable in the editor diff --git a/packages/block-library/src/page-list/style.scss b/packages/block-library/src/page-list/style.scss index 9c65b730255b2d..a06f286db837ba 100644 --- a/packages/block-library/src/page-list/style.scss +++ b/packages/block-library/src/page-list/style.scss @@ -19,6 +19,7 @@ display: flex; flex-wrap: wrap; } + .wp-block-pages-list__item__link { display: block; color: inherit; @@ -101,3 +102,10 @@ display: block; } } + +// space-between justification. +.wp-block-page-list { + .items-justified-space-between & { + display: contents; + } +}