Skip to content

A platform for community discussion. Free, open, simple.

UX: add flex to mention for consistent alignment and spacing (#32105)

chapoi191ab68509da
diff --git a/app/assets/stylesheets/common/base/topic-post.scss b/app/assets/stylesheets/common/base/topic-post.scss
index 29761e9d598..497edbd1ee5 100644
--- a/app/assets/stylesheets/common/base/topic-post.scss
+++ b/app/assets/stylesheets/common/base/topic-post.scss
@@ -1265,9 +1265,8 @@ a.mention-group {
}
.mention .emoji {
- margin-left: 0.3em;
- width: 15px;
- height: 15px;
+ width: 0.93em;
+ height: 0.93em;
}
span.mention {
diff --git a/app/assets/stylesheets/common/components/hashtag.scss b/app/assets/stylesheets/common/components/hashtag.scss
index a4272acb146..942a2c84e73 100644
--- a/app/assets/stylesheets/common/components/hashtag.scss
+++ b/app/assets/stylesheets/common/components/hashtag.scss
@@ -36,9 +36,9 @@ a.hashtag {
}
img.emoji {
- width: 15px;
- height: 15px;
- vertical-align: text-top;
+ width: 0.93em;
+ height: 0.93em;
+ vertical-align: middle;
}
svg {
@@ -56,7 +56,6 @@ a.hashtag {
.hashtag-category-icon,
.hashtag-category-emoji {
- margin-right: 0.25em;
display: inline-block;
}
}
@@ -111,8 +110,8 @@ a.hashtag {
.hashtag-category-icon,
.hashtag-category-emoji {
flex: 0 0 auto;
- width: 15px;
- height: 15px;
+ width: 1em;
+ height: 1em;
margin-right: 5px;
display: inline-block;
}
@@ -121,7 +120,7 @@ a.hashtag {
.hashtag-category-emoji .emoji {
width: 15px;
height: 15px;
- vertical-align: top;
+ vertical-align: middle;
}
}
diff --git a/app/assets/stylesheets/common/foundation/mixins.scss b/app/assets/stylesheets/common/foundation/mixins.scss
index 410a225de3b..f921c00d4d9 100644
--- a/app/assets/stylesheets/common/foundation/mixins.scss
+++ b/app/assets/stylesheets/common/foundation/mixins.scss
@@ -235,15 +235,18 @@ $hpad: 0.65em;
}
@mixin mention() {
- display: inline;
+ display: inline-flex;
+ align-items: center;
+ gap: 0.25em;
font-size: 0.93em;
font-weight: normal;
color: var(--primary);
- padding: 0.14em 0.34em 0.19em;
+ padding: 0.2em 0.34em;
background: var(--primary-low);
border-radius: 0.6em;
text-decoration: none;
text-wrap: nowrap;
+ line-height: 1;
&.--bot {
background: var(--success-low);