UX: improve mention styling, simplify (#19169)

* UX: improve mention styling, simplify

* revert default
This commit is contained in:
Kris 2022-11-23 17:35:57 -05:00 committed by GitHub
parent 470b8b8984
commit 6b7bdc991d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 18 additions and 51 deletions

View File

@ -2,10 +2,6 @@
// To style group content differently, use the existing classes with a .group parent class. // To style group content differently, use the existing classes with a .group parent class.
// For example: .group .user-secondary-navigation // For example: .group .user-secondary-navigation
span.mention-group {
color: var(--primary);
}
.group-details-container { .group-details-container {
background: var(--primary-very-low); background: var(--primary-very-low);
padding: 20px; padding: 20px;

View File

@ -1197,6 +1197,13 @@ blockquote > *:last-child {
padding-right: 0.5em; padding-right: 0.5em;
line-height: var(--line-height-medium); line-height: var(--line-height-medium);
flex: 1 1; flex: 1 1;
.mention {
// needs some special sizing and positioning due to surrounding all-caps text
position: relative;
top: -1px;
font-size: var(--font-0);
text-transform: initial;
}
} }
} }
@ -1248,30 +1255,17 @@ blockquote > *:last-child {
} }
} }
a.mention { a.mention,
a.mention-group {
// linked // linked
@include mention; @include mention;
} }
span.mention { span.mention {
// unlinked // unlinked, invalid mention
color: var(--primary-high); color: var(--primary-high);
} }
a.mention-group {
// unlinked
display: inline-block;
color: var(--primary-high);
cursor: default;
&.notify,
.small-action-desc & {
// linked
cursor: pointer;
@include mention;
}
}
.suggested-topics { .suggested-topics {
.topics { .topics {
padding-bottom: 15px; padding-bottom: 15px;

View File

@ -194,10 +194,6 @@
max-height: 300px; max-height: 300px;
overflow: auto; overflow: auto;
a[href] {
text-decoration: underline;
}
img { img {
max-width: 100%; max-width: 100%;
} }

View File

@ -160,12 +160,8 @@ $avatar_margin: -50px; // negative margin makes avatars extend above cards
max-height: 150px; max-height: 150px;
overflow: auto; overflow: auto;
.bio { .bio {
a { a:not(.mention) {
color: var(--primary); color: var(--tertiary);
text-decoration: underline;
}
a.mention {
text-decoration: none;
} }
.overflow { .overflow {
max-height: 60px; max-height: 60px;
@ -287,17 +283,13 @@ $avatar_margin: -50px; // negative margin makes avatars extend above cards
max-height: 150px; max-height: 150px;
overflow: auto; overflow: auto;
.bio { .bio {
a { a:not(.mention) {
color: var(--primary); color: var(--tertiary);
text-decoration: underline;
} }
img { img {
max-width: 100%; max-width: 100%;
height: auto; height: auto;
} }
a.mention {
text-decoration: none;
}
.overflow { .overflow {
max-height: 60px; max-height: 60px;
overflow: hidden; overflow: hidden;

View File

@ -239,8 +239,10 @@ $hpad: 0.65em;
@mixin mention() { @mixin mention() {
display: inline-block; // https://bugzilla.mozilla.org/show_bug.cgi?id=1656119 display: inline-block; // https://bugzilla.mozilla.org/show_bug.cgi?id=1656119
font-size: 0.93em; font-size: 0.93em;
font-weight: normal;
color: var(--primary); color: var(--primary);
padding: 0 4px 1px; padding: 0 0.3em 0.07em;
background: var(--primary-low); background: var(--primary-low);
border-radius: 8px; border-radius: 0.6em;
text-decoration: none;
} }

View File

@ -161,9 +161,6 @@ table.user-invite-list {
.primary { .primary {
.primary-textual { .primary-textual {
padding: 0 4px 4px; padding: 0 4px 4px;
a[href] {
text-decoration: underline;
}
h1 { h1 {
max-width: 100%; max-width: 100%;
@include ellipsis; @include ellipsis;
@ -180,10 +177,6 @@ table.user-invite-list {
.bio { .bio {
max-width: 750px; max-width: 750px;
a.mention {
text-decoration: none;
}
} }
} }

View File

@ -138,12 +138,6 @@
color: var(--primary); color: var(--primary);
} }
.valid-mention {
padding: 0 4px 1px;
border-radius: 8px;
display: inline-block;
}
img.ytp-thumbnail-image { img.ytp-thumbnail-image {
height: 100%; height: 100%;
max-height: unset; max-height: unset;