This repository was archived by the owner on Sep 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 822
Style mentions as pills in rich text editor #10448
Merged
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,9 +101,37 @@ limitations under the License. | |
} | ||
} | ||
|
||
/* this selector represents what will become a pill */ | ||
/* this selector represents what will become a pill | ||
nb despite there being mx_UserPill and mx_RoomPill classes appended to these pills | ||
in the current composer, there don't appear to be any styles associated with those classes | ||
in this repo */ | ||
a[data-mention-type] { | ||
cursor: text; | ||
/* these entries duplicate mx_Pill from _Pill.pcss */ | ||
padding: $font-1px 0.4em $font-1px 0.4em; | ||
line-height: $font-17px; | ||
border-radius: $font-16px; | ||
vertical-align: text-top; | ||
/* TODO turning this on hides the cursor from the composer for some | ||
reason, so comment out for now and assess if it's needed when we add | ||
the Avatars | ||
display: inline-flex; | ||
align-items: center; not required with the above turned off | ||
|
||
Potential fix is using display: inline, width: fit-content | ||
*/ | ||
Comment on lines
+114
to
+121
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Leaving commented out CSS in for the moment - it's not immediately apparent to me whether or not this will be required for Avatars |
||
box-sizing: border-box; | ||
max-width: 100%; | ||
overflow: hidden; | ||
|
||
color: $accent-fg-color; | ||
background-color: $pill-bg-color; | ||
|
||
/* combining the overrides from _BasicMessageComposer.pcss */ | ||
user-select: all; | ||
position: relative; | ||
cursor: unset; /* We don't want indicate clickability */ | ||
text-overflow: ellipsis; | ||
white-space: nowrap; | ||
} | ||
} | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.