diff --git a/packages/block-library/src/social-links/edit.js b/packages/block-library/src/social-links/edit.js
index 44abbf168c701f..0dc799628de5c9 100644
--- a/packages/block-library/src/social-links/edit.js
+++ b/packages/block-library/src/social-links/edit.js
@@ -45,6 +45,7 @@ export function SocialLinksEdit( props ) {
attributes,
iconBackgroundColor,
iconColor,
+ isSelected,
setAttributes,
setIconBackgroundColor,
setIconColor,
@@ -72,14 +73,20 @@ export function SocialLinksEdit( props ) {
}, [ logosOnly, setAttributes ] );
const SocialPlaceholder = (
-
+
+ );
+
+ const SelectedSocialPlaceholder = (
+
+ { __( 'Click plus to add' ) }
+
);
// Fallback color values are used maintain selections in case switching
@@ -95,7 +102,7 @@ export function SocialLinksEdit( props ) {
const innerBlocksProps = useInnerBlocksProps( blockProps, {
allowedBlocks: ALLOWED_BLOCKS,
orientation: 'horizontal',
- placeholder: SocialPlaceholder,
+ placeholder: isSelected ? SelectedSocialPlaceholder : SocialPlaceholder,
templateLock: false,
__experimentalAppenderTagName: 'li',
} );
diff --git a/packages/block-library/src/social-links/editor.scss b/packages/block-library/src/social-links/editor.scss
index a75e5e78e50f0e..0085fa4c6bc0d8 100644
--- a/packages/block-library/src/social-links/editor.scss
+++ b/packages/block-library/src/social-links/editor.scss
@@ -19,13 +19,7 @@
.wp-block-social-links__social-placeholder {
display: flex;
opacity: 0.8;
- transition: all 0.1s ease-in-out;
- @include reduce-motion("transition");
-
- .is-selected > & {
- opacity: 0;
- width: 0; // This allows the appender to sit on the left as it should.
- }
+ list-style: none;
// Use the first link to set the height.
> .wp-social-link {
@@ -53,10 +47,6 @@
}
}
- & + .block-list-appender {
- box-shadow: inset 0 0 0 $border-width $gray-700;
- }
-
.wp-social-link::before {
content: "";
display: block;
@@ -70,6 +60,25 @@
}
}
+// Selected placeholder state.
+.wp-block-social-links .wp-block-social-links__social-prompt {
+ list-style: none;
+ order: 2; // Move after the appender button. Because this element is non-interactive, it does not affect tab order.
+
+ // Show as block UI.
+ font-family: $default-font;
+ font-size: $default-font-size;
+ line-height: $button-size-small;
+ margin-top: auto;
+ margin-bottom: auto;
+ cursor: default;
+
+ & + .block-list-appender {
+ margin-right: $grid-unit-10;
+ padding: 0.25em;
+ }
+}
+
// Polish the Appender.
.wp-block-social-links .block-list-appender {
// Match the overall silhouette of social links.