From 6739882e12ddf3cad718056172278d8cd53c5c94 Mon Sep 17 00:00:00 2001 From: Alun Turner Date: Fri, 31 Mar 2023 14:22:01 +0100 Subject: [PATCH 1/2] apply _Editor CSS changes --- .../wysiwyg_composer/components/_Editor.pcss | 32 +++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/res/css/views/rooms/wysiwyg_composer/components/_Editor.pcss b/res/css/views/rooms/wysiwyg_composer/components/_Editor.pcss index 849fd3c5d3d..9bc01d5b2e6 100644 --- a/res/css/views/rooms/wysiwyg_composer/components/_Editor.pcss +++ b/res/css/views/rooms/wysiwyg_composer/components/_Editor.pcss @@ -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 + */ + 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; } } From da7301321acb9363308687ad5fd1799ecbef6bbd Mon Sep 17 00:00:00 2001 From: alunturner <56027671+alunturner@users.noreply.github.com> Date: Mon, 3 Apr 2023 09:49:39 +0100 Subject: [PATCH 2/2] use padding shorthand Co-authored-by: Germain --- res/css/views/rooms/wysiwyg_composer/components/_Editor.pcss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/css/views/rooms/wysiwyg_composer/components/_Editor.pcss b/res/css/views/rooms/wysiwyg_composer/components/_Editor.pcss index 9bc01d5b2e6..b15d3b74c17 100644 --- a/res/css/views/rooms/wysiwyg_composer/components/_Editor.pcss +++ b/res/css/views/rooms/wysiwyg_composer/components/_Editor.pcss @@ -107,7 +107,7 @@ limitations under the License. in this repo */ a[data-mention-type] { /* these entries duplicate mx_Pill from _Pill.pcss */ - padding: $font-1px 0.4em $font-1px 0.4em; + padding: $font-1px 0.4em; line-height: $font-17px; border-radius: $font-16px; vertical-align: text-top;