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

Commit 70f7e19

Browse files
committed
Fix hover/focus chevron on thread summary relying on font character
1 parent c046660 commit 70f7e19

File tree

3 files changed

+40
-22
lines changed

3 files changed

+40
-22
lines changed

res/css/views/rooms/_EventTile.scss

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -742,40 +742,47 @@ $left-gutter: 64px;
742742
overflow: hidden;
743743
border: 1px solid $system; // always render a border so the hover effect doesn't require a re-layout
744744

745-
&:hover {
746-
cursor: pointer;
747-
border-color: $quinary-content;
748-
}
749-
750-
&::before {
751-
align-self: center; // v-align the threads icon
752-
}
753-
754-
&::after {
755-
content: "";
745+
.mx_ThreadInfo_chevron {
756746
position: absolute;
757747
top: 0;
758748
right: 0;
759749
bottom: 0;
760750
width: 60px;
761-
padding: 0 10px;
762-
font-size: 15px;
763-
line-height: 39px;
764751
box-sizing: border-box;
765-
766-
text-align: right;
767-
font-weight: 600;
768-
769752
background: linear-gradient(270deg, $system 52.6%, transparent 100%);
770753

771754
opacity: 0;
772-
transform: translateX(20px);
755+
transform: translateX(60px);
773756
transition: all .1s ease-in-out;
757+
758+
&::before {
759+
content: '';
760+
position: absolute;
761+
top: 50%;
762+
right: 12px;
763+
transform: translateY(-50%);
764+
width: 12px;
765+
height: 12px;
766+
mask-image: url('$(res)/img/compound/chevron-right-12px.svg');
767+
mask-position: center;
768+
mask-size: contain;
769+
mask-repeat: no-repeat;
770+
background-color: $secondary-content;
771+
}
774772
}
775773

776-
&:hover::after {
777-
opacity: 1;
778-
transform: translateX(0);
774+
&:hover, &:focus {
775+
cursor: pointer;
776+
border-color: $quinary-content;
777+
778+
.mx_ThreadInfo_chevron {
779+
opacity: 1;
780+
transform: translateX(0);
781+
}
782+
}
783+
784+
&::before {
785+
align-self: center; // v-align the threads icon
779786
}
780787
}
781788

Lines changed: 10 additions & 0 deletions
Loading

src/components/views/rooms/ThreadSummary.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ const ThreadSummary = ({ mxEvent, thread }: IProps) => {
6262
{ countSection }
6363
</span>
6464
<ThreadMessagePreview thread={thread} showDisplayname={!roomContext.narrow} />
65+
<div className="mx_ThreadInfo_chevron" />
6566
</AccessibleButton>
6667
);
6768
};

0 commit comments

Comments
 (0)