Skip to content

Commit db0f9c1

Browse files
mattwiebepfefferle
andauthored
Follow Me: truncate long blog titles and handles (#453)
Also add typography control Co-authored-by: Matthias Pfefferle <[email protected]>
1 parent 42d9aba commit db0f9c1

File tree

4 files changed

+25
-4
lines changed

4 files changed

+25
-4
lines changed

build/follow-me/block.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424
"width": true,
2525
"color": true,
2626
"style": true
27+
},
28+
"typography": {
29+
"fontSize": true,
30+
"__experimentalDefaultControls": {
31+
"fontSize": true
32+
}
2733
}
2834
},
2935
"attributes": {

build/follow-me/style-index.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/follow-me/block.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424
"width": true,
2525
"color": true,
2626
"style": true
27+
},
28+
"typography": {
29+
"fontSize": true,
30+
"__experimentalDefaultControls": {
31+
"fontSize": true
32+
}
2733
}
2834
},
2935
"attributes": {

src/follow-me/style.scss

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,22 @@
1010
margin-right: 1rem;
1111
border-radius: 50%;
1212
}
13-
.activitypub-profile__name {
13+
.activitypub-profile__content {
14+
flex: 1;
15+
min-width: 0;
16+
}
17+
.activitypub-profile__name, .activitypub-profile__handle {
1418
margin: 0;
1519
line-height: 1;
16-
font-size: var( --wp--preset--font-size--large );
20+
white-space: nowrap;
21+
overflow: hidden;
22+
text-overflow: ellipsis;
23+
}
24+
.activitypub-profile__name {
25+
font-size: 1.25em;
1726
}
1827
.activitypub-profile__follow {
19-
margin-left: auto;
28+
margin-left: 1rem;
2029
align-self: center;
2130
background-color: var(--wp--preset--color--black);
2231
color: var(--wp--preset--color--white);

0 commit comments

Comments
 (0)