Skip to content

Commit 7cf7369

Browse files
authored
Initial work. (#29756)
1 parent 99b3923 commit 7cf7369

File tree

1 file changed

+36
-21
lines changed

1 file changed

+36
-21
lines changed

packages/block-library/src/social-links/editor.scss

Lines changed: 36 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,8 @@
2323
@include reduce-motion("transition");
2424

2525
.is-selected > & {
26-
opacity: 0.1;
27-
}
28-
29-
// Show more opaque in dark themes.
30-
.is-dark-theme .is-selected & {
31-
opacity: 0.4;
26+
opacity: 0;
27+
width: 0; // This allows the appender to sit on the left as it should.
3228
}
3329

3430
// Use the first link to set the height.
@@ -57,6 +53,10 @@
5753
}
5854
}
5955

56+
& + .block-list-appender {
57+
box-shadow: inset 0 0 0 $border-width $gray-700;
58+
}
59+
6060
.wp-social-link::before {
6161
content: "";
6262
display: block;
@@ -71,30 +71,45 @@
7171
}
7272

7373
// Polish the Appender.
74-
.wp-block-social-links .wp-block-social-links__social-placeholder + .block-list-appender {
75-
position: absolute;
76-
}
77-
7874
.wp-block-social-links .block-list-appender {
79-
padding: 0;
75+
// Match the overall silhouette of social links.
76+
margin: 4px auto 4px 0;
77+
border-radius: 9999px; // This works as both circular and pill shapes.
8078

81-
&::before {
82-
content: "";
83-
display: block;
79+
// Treat just like a social icon.
80+
.block-editor-inserter {
81+
display: flex;
82+
align-items: center;
83+
justify-content: center;
84+
font-size: inherit;
8485
width: 1em;
8586
height: 1em;
8687
}
8788

88-
.block-editor-inserter {
89-
position: absolute;
90-
top: 0;
89+
// Duplicate the font sizes from style.scss to size the appender.
90+
.has-small-icon-size & {
91+
font-size: 16px; // 16 makes for a quarter-padding that keeps the icon centered.
9192
}
92-
}
9393

94-
.wp-block-social-links.is-style-logos-only .block-list-appender {
95-
padding: 4px;
96-
}
94+
// Normal/default.
95+
.has-normal-icon-size & {
96+
font-size: 24px;
97+
}
98+
99+
// Large.
100+
.has-large-icon-size & {
101+
font-size: 36px;
102+
}
97103

104+
// Huge.
105+
.has-huge-icon-size & {
106+
font-size: 48px;
107+
}
108+
109+
&::before {
110+
content: none;
111+
}
112+
}
98113

99114
// Center flex items. This has an equivalent in style.scss.
100115
.wp-block[data-align="center"] > .wp-block-social-links {

0 commit comments

Comments
 (0)