Fix pills.

This was a hard pill to swallow
This commit is contained in:
Jorik Schellekens 2020-04-03 17:53:49 +01:00
parent 92005b15d8
commit e2aef3a62b
4 changed files with 43 additions and 36 deletions

View file

@ -6,11 +6,14 @@
.mx_RoomPill,
.mx_GroupPill,
.mx_AtRoomPill {
border-radius: 16px;
display: inline-block;
height: 20px;
display: inline-flex;
align-items: center;
vertical-align: middle;
border-radius: $font-16px;
height: $font-16px;
line-height: $font-20px;
padding-left: 5px;
padding-left: 0;
padding-right: 0.5em;
}
a.mx_Pill {
@ -19,6 +22,11 @@ a.mx_Pill {
overflow: hidden;
vertical-align: text-bottom;
max-width: calc(100% - 1ch);
height: $font-24px;
}
.mx_Pill {
padding: 0.3rem;
}
/* More specific to override `.markdown-body a` text-decoration */
@ -31,8 +39,7 @@ a.mx_Pill {
.mx_UserPill {
color: $primary-fg-color;
background-color: $other-user-pill-bg-color;
padding-right: 5px;
}
}
.mx_UserPill_selected {
background-color: $accent-color !important;
@ -45,7 +52,6 @@ a.mx_Pill {
.mx_MessageComposer_input .mx_AtRoomPill {
color: $accent-fg-color;
background-color: $mention-user-pill-bg-color;
padding-right: 5px;
}
/* More specific to override `.markdown-body a` color */
@ -55,15 +61,6 @@ a.mx_Pill {
.mx_GroupPill {
color: $accent-fg-color;
background-color: $rte-room-pill-color;
padding-right: 5px;
}
/* More specific to override `.markdown-body a` color */
.mx_EventTile_content .markdown-body a.mx_GroupPill,
.mx_GroupPill {
color: $accent-fg-color;
background-color: $rte-group-pill-color;
padding-right: 5px;
}
.mx_EventTile_body .mx_UserPill,
@ -77,8 +74,10 @@ a.mx_Pill {
.mx_GroupPill .mx_BaseAvatar,
.mx_AtRoomPill .mx_BaseAvatar {
position: relative;
left: -3px;
top: 2px;
display: inline-flex;
align-items: center;
border-radius: 10rem;
margin-right: 0.24rem;
}
.mx_Markdown_BOLD {

View file

@ -31,9 +31,10 @@
}
.mx_Autocomplete_Completion_pill {
border-radius: 17px;
height: 34px;
padding: 0px 5px;
box-sizing: border-box;
border-radius: 2rem;
height: $font-34px;
padding: 0.4rem;
display: flex;
user-select: none;
cursor: pointer;
@ -42,7 +43,7 @@
}
.mx_Autocomplete_Completion_pill > * {
margin: 0 3px;
margin-right: 0.3rem;
}
/* styling for common completion elements */

View file

@ -46,22 +46,19 @@ limitations under the License.
&.mx_BasicMessageComposer_input_shouldShowPillAvatar {
span.mx_UserPill, span.mx_RoomPill {
padding-left: 21px;
position: relative;
// avatar psuedo element
&::before {
position: absolute;
left: 2px;
top: 2px;
content: var(--avatar-letter);
width: 16px;
height: 16px;
width: $font-16px;
height: $font-16px;
margin-right: 0.24rem;
background: var(--avatar-background), $avatar-bg-color;
color: $avatar-initial-color;
background-repeat: no-repeat;
background-size: 16px;
border-radius: 8px;
background-size: $font-16px;
border-radius: $font-16px;
text-align: center;
font-weight: normal;
line-height: $font-16px;