From 7cfd5a865f7234f1c776ea13caf411ab5b1e178e Mon Sep 17 00:00:00 2001 From: Hiroshi Urabe Date: Fri, 23 Feb 2024 16:55:42 +0900 Subject: [PATCH 1/4] show .components-placeholder__fieldset only is-selected. --- packages/components/src/placeholder/style.scss | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/components/src/placeholder/style.scss b/packages/components/src/placeholder/style.scss index 8c6ca721123004..b135b8183fe8f3 100644 --- a/packages/components/src/placeholder/style.scss +++ b/packages/components/src/placeholder/style.scss @@ -183,6 +183,9 @@ } .components-placeholder__fieldset { + // Show only is selected. + display: none; + width: auto; // Unset intrinsic margins. @@ -208,6 +211,10 @@ opacity: 1; pointer-events: auto; } + + .components-placeholder__fieldset { + display: flex; + } } // By painting the borders here, we enable them to be replaced by the Border control. From 6f81561dbb7bc4223d38be484578416ee6772dfd Mon Sep 17 00:00:00 2001 From: Hiroshi Urabe Date: Fri, 23 Feb 2024 17:24:03 +0900 Subject: [PATCH 2/4] only wp-core-image --- packages/block-library/src/image/editor.scss | 8 ++++++++ packages/components/src/placeholder/style.scss | 7 ------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/block-library/src/image/editor.scss b/packages/block-library/src/image/editor.scss index d3fafcfcab4eca..bc70f681be0e02 100644 --- a/packages/block-library/src/image/editor.scss +++ b/packages/block-library/src/image/editor.scss @@ -1,6 +1,12 @@ // Provide special styling for the placeholder. // @todo: this particular minimal style of placeholder could be componentized further. .wp-block-image.wp-block-image { + + &:not(.is-selected) .components-placeholder__fieldset { + // Show only is selected. + display: none; + } + // Show Placeholder style on-select. &.is-selected .components-placeholder { // Block UI appearance. @@ -27,6 +33,8 @@ opacity: 0; } } + + .block-bindings-media-placeholder-message { opacity: 0; } diff --git a/packages/components/src/placeholder/style.scss b/packages/components/src/placeholder/style.scss index b135b8183fe8f3..8c6ca721123004 100644 --- a/packages/components/src/placeholder/style.scss +++ b/packages/components/src/placeholder/style.scss @@ -183,9 +183,6 @@ } .components-placeholder__fieldset { - // Show only is selected. - display: none; - width: auto; // Unset intrinsic margins. @@ -211,10 +208,6 @@ opacity: 1; pointer-events: auto; } - - .components-placeholder__fieldset { - display: flex; - } } // By painting the borders here, we enable them to be replaced by the Border control. From 2205f28b456917296fca0d4ab252bc635c676311 Mon Sep 17 00:00:00 2001 From: Hiroshi Urabe Date: Fri, 23 Feb 2024 17:25:40 +0900 Subject: [PATCH 3/4] fix css formatting --- packages/block-library/src/image/editor.scss | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/block-library/src/image/editor.scss b/packages/block-library/src/image/editor.scss index bc70f681be0e02..cfa9b232be666c 100644 --- a/packages/block-library/src/image/editor.scss +++ b/packages/block-library/src/image/editor.scss @@ -34,7 +34,6 @@ } } - .block-bindings-media-placeholder-message { opacity: 0; } From 4e71d4eb90385ac30fcfe6dae683f21d957e49c7 Mon Sep 17 00:00:00 2001 From: Hiroshi Urabe Date: Fri, 23 Feb 2024 17:26:23 +0900 Subject: [PATCH 4/4] fix css formatting --- packages/block-library/src/image/editor.scss | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/block-library/src/image/editor.scss b/packages/block-library/src/image/editor.scss index cfa9b232be666c..8382ad1e7da32d 100644 --- a/packages/block-library/src/image/editor.scss +++ b/packages/block-library/src/image/editor.scss @@ -33,7 +33,6 @@ opacity: 0; } } - .block-bindings-media-placeholder-message { opacity: 0; }