Skip to content

Commit ce77df6

Browse files
committed
fix(timeline): keep name colours readable in state and membership lines
Signed-off-by: Erwan Leboucher <erwanleboucher@gmail.com>
1 parent 48da5ab commit ce77df6

3 files changed

Lines changed: 21 additions & 5 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
default: patch
3+
---
4+
5+
Keep name colours readable in membership and state lines instead of fading them with the rest of the line

‎src/lib/features/room/timeline/TimelineMemberGroup.svelte‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,16 @@
113113
.member-group {
114114
align-items: center;
115115
color: var(--surface-var-on-container);
116+
color: color-mix(
117+
in srgb,
118+
var(--surface-var-on-container) calc(var(--opacity-p300) * 100%),
119+
transparent
120+
);
116121
display: flex;
117122
font-size: var(--font-size-body);
118123
gap: var(--timeline-row-gap);
119124
line-height: var(--line-height-body);
120125
margin: 0;
121-
opacity: var(--opacity-p300);
122126
}
123127
124128
.state-icon {

‎src/lib/features/room/timeline/TimelineNotice.svelte‎

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@
194194
{@render stateTime()}
195195
</p>
196196
{#if item.content.content !== null}
197-
<div class="state-detail">
197+
<div class="state-detail state-diff">
198198
<StateContentDiff before={item.content.prev_content} after={item.content.content} />
199199
</div>
200200
{/if}
@@ -293,11 +293,15 @@
293293
}
294294
295295
.state-icon,
296-
.state :global(.state-event-text),
297-
.state-text {
296+
.state-text,
297+
.state :global(.state-emote) {
298298
opacity: var(--opacity-p300);
299299
}
300300
301+
.state :global(.state-event-text) {
302+
color: color-mix(in srgb, currentcolor calc(var(--opacity-p300) * 100%), transparent);
303+
}
304+
301305
.state-icon {
302306
align-items: center;
303307
align-self: start;
@@ -331,10 +335,13 @@
331335
gap: var(--space-050);
332336
margin-inline-start: calc(var(--avatar-size-small) + var(--timeline-row-gap));
333337
min-width: 0;
334-
opacity: var(--opacity-p300);
335338
padding-block: var(--space-050);
336339
}
337340
341+
.state-diff {
342+
opacity: var(--opacity-p300);
343+
}
344+
338345
.state-detail.target-above,
339346
.state-detail:has(:global(.target-connected)) {
340347
padding-block: 0;

0 commit comments

Comments
 (0)