Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit f3b762c

Browse files
authored
Move unread notification dots of the threads list to the expected position (#8700)
* Change dot size from 10px to 8px Signed-off-by: Suguru Hirahara <[email protected]> * Set inset 8px to the dot Signed-off-by: Suguru Hirahara <[email protected]> * Use shorthand properties for inset Signed-off-by: Suguru Hirahara <[email protected]> * Move blocks from '.mx_EventTile:not([data-layout=bubble])' to '.mx_EventTile[data-shape=ThreadsList]' For a notification dot it does not matter whether the layout of the event tile is bubble or not. Instead what matters is that the dot is expected to be displayed on the threads list. Signed-off-by: Suguru Hirahara <[email protected]> * Remove redundant declarations Signed-off-by: Suguru Hirahara <[email protected]> * Remove an obsolete z-index declaration The declaration was added with ed34952 to fix a clickability issue. Now the event tile is clickable everywhere, it is no longer required. Signed-off-by: Suguru Hirahara <[email protected]>
1 parent 0f26ddd commit f3b762c

File tree

1 file changed

+17
-25
lines changed

1 file changed

+17
-25
lines changed

res/css/views/rooms/_EventTile.scss

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -79,25 +79,6 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
7979
font-size: $font-14px;
8080
position: relative;
8181

82-
&[data-shape=ThreadsList][data-notification]::before {
83-
content: "";
84-
position: absolute;
85-
width: 10px;
86-
height: 10px;
87-
border-radius: 50%;
88-
right: -25px; // center it in the gutter (16px margin + 4px padding + half 10px width)
89-
top: 4px;
90-
left: auto;
91-
}
92-
93-
&[data-shape=ThreadsList][data-notification=total]::before {
94-
background-color: $room-icon-unread-color;
95-
}
96-
97-
&[data-shape=ThreadsList][data-notification=highlight]::before {
98-
background-color: $alert;
99-
}
100-
10182
.mx_ThreadSummary,
10283
.mx_ThreadSummaryIcon {
10384
margin-left: 64px;
@@ -780,12 +761,23 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
780761
&::before {
781762
content: "";
782763
position: absolute;
783-
top: 0;
784-
bottom: 0;
785-
left: 0;
786-
right: 0;
787-
/* enough to cover all sibling elements */
788-
z-index: 10;
764+
inset: 0;
765+
}
766+
767+
// Display notification dot
768+
&[data-notification]::before {
769+
width: 8px;
770+
height: 8px;
771+
border-radius: 50%;
772+
inset: 14px 8px auto auto; // 14px: align the dot with the timestamp row
773+
}
774+
775+
&[data-notification=total]::before {
776+
background-color: $room-icon-unread-color;
777+
}
778+
779+
&[data-notification=highlight]::before {
780+
background-color: $alert;
789781
}
790782

791783
&:last-child {

0 commit comments

Comments
 (0)