Skip to content

Commit 0958a6b

Browse files
authored
Merge pull request element-hq#1835 from vector-im/wmwragg/mention-state-indicator-round-2
Wmwragg/mention state indicator round 2
2 parents 25eb2e2 + f3586a7 commit 0958a6b

1 file changed

Lines changed: 31 additions & 37 deletions

File tree

  • src/skins/vector/css/matrix-react-sdk/views/rooms

‎src/skins/vector/css/matrix-react-sdk/views/rooms/RoomTile.css‎

Lines changed: 31 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,26 @@ limitations under the License.
1919
/* This fixes wrapping of long room names, but breaks drag & drop previews */
2020
/* display: table-row; */
2121
font-size: 13px;
22-
position: relative;
22+
display: block;
2323
}
2424

2525
.mx_RoomTile_avatar {
26-
display: table-cell;
27-
padding-right: 11px;
26+
display: inline-block;
2827
padding-top: 6px;
2928
padding-bottom: 6px;
3029
padding-left: 18px;
3130
width: 24px;
3231
height: 24px;
33-
position: relative;
3432
vertical-align: middle;
3533
}
3634

3735
.mx_RoomTile_name {
38-
display: table-cell;
39-
width: 100%;
36+
display: inline-block;
37+
width: 100px;
4038
vertical-align: middle;
4139
overflow: hidden;
4240
word-break: break-word;
41+
padding-left: 11px;
4342
padding-right: 15px;
4443
color: rgba(69, 69, 69, 0.8);
4544
}
@@ -58,23 +57,28 @@ limitations under the License.
5857
display: none;
5958
}
6059

60+
.collapsed .mx_RoomTile {
61+
height: 36px;
62+
}
63+
6164
.collapsed .mx_RoomTile_badge {
62-
margin-top: -15px;
63-
right: 7px;
65+
top: -40px;
66+
left: 30px;
6467
min-width: 12px;
6568
height: 16px;
6669
border-radius: 16px;
6770
padding: 0px 4px 0px 4px;
6871
z-index: 200;
6972
}
7073

74+
/* This is the bottom of the speech bubble */
7175
.mx_RoomTile_highlight .mx_RoomTile_badge:after {
7276
content: "";
7377
position: absolute;
7478
display: block;
7579
width: 0;
7680
height: 0;
77-
margin-left: 7px;
81+
margin-left: 4px;
7882
border-top: 8px solid #ff0064;
7983
border-right: 10px solid transparent;
8084
}
@@ -86,18 +90,25 @@ style are the same, this style needs to be AFTER it to take effect when matched
8690
}
8791

8892
.mx_RoomTile_badge {
89-
min-width: 15px;
93+
display: inline-block;
94+
min-width: 14px;
9095
height: 18px;
91-
position: absolute;
92-
right: 16px;
93-
top: 50%;
94-
margin-top: -8px;
96+
position: relative;
97+
left: 8px;
98+
top: 2px;
9599
border-radius: 18px;
96100
color: #fff;
97101
font-weight: bold;
98102
font-size: 11px;
99103
text-align: center;
100-
padding: 2px 6px 0px 5px;
104+
padding-top: 2px;
105+
padding-left: 4px;
106+
padding-right: 4px;
107+
}
108+
109+
.mx_RoomTile_badge:hover {
110+
letter-spacing: 0.1em;
111+
opacity: 1;
101112
}
102113

103114
.mx_RoomTile_unreadNotify .mx_RoomTile_badge {
@@ -108,24 +119,13 @@ style are the same, this style needs to be AFTER it to take effect when matched
108119
background-color: #ff0064;
109120
}
110121

111-
.mx_RoomTile_unread,
112-
.mx_RoomTile_highlight {
113-
font-weight: bold;
114-
}
115-
116-
/* the inner highlight span has 4px of padding on it, so we shrink the _avatar by 4px and grow the _name by 4px to fit it in */
117-
.mx_RoomTile_selected .mx_RoomTile_name {
118-
padding-right: 19px;
119-
}
120-
.mx_RoomTile_selected .mx_RoomTile_avatar {
121-
padding-right: 7px;
122+
.mx_RoomTile_badge_no_unread {
123+
background-color: rgb(214, 214, 214);
124+
opacity: 0;
122125
}
123126

124-
/* leave room for the badge, if present.
125-
N.B. this has to come after the above _selected width tweaks */
126-
.mx_RoomTile_unreadNotify .mx_RoomTile_name,
127-
.mx_RoomTile_highlight .mx_RoomTile_name {
128-
padding-right: 40px;
127+
.mx_RoomTile_unread, .mx_RoomTile_highlight {
128+
font-weight: bold;
129129
}
130130

131131
.mx_RoomTile_selected .mx_RoomTile_name span {
@@ -139,12 +139,6 @@ style are the same, this style needs to be AFTER it to take effect when matched
139139
background-color: rgba(118,207,166,0.2);
140140
}
141141

142-
/* stop the span from overlapping with the badge */
143-
.mx_RoomTile_unreadNotify.mx_RoomTile_selected .mx_RoomTile_name span,
144-
.mx_RoomTile_highlight.mx_RoomTile_selected .mx_RoomTile_name span {
145-
padding-right: 22px;
146-
}
147-
148142
.mx_RoomTile_arrow {
149143
position: absolute;
150144
right: 0px;

0 commit comments

Comments
 (0)