Skip to content

Commit

Permalink
fix: remove some performance-impacting css properties
Browse files Browse the repository at this point in the history
  • Loading branch information
vyneer committed Jul 15, 2024
1 parent 19d966e commit 7624724
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
15 changes: 9 additions & 6 deletions assets/chat/css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,6 @@ hr {
.chat-lines {
font-family: $chat-lines-font;
line-height: 1.65em;
backface-visibility: hidden;
perspective: 1000px;
outline: 0 !important;
}

Expand Down Expand Up @@ -309,7 +307,6 @@ hr {
.chat-user {
cursor: pointer;
position: relative;
z-index: 120;
}
.chat-user:hover {
text-decoration: underline;
Expand All @@ -329,7 +326,6 @@ hr {
.externallink {
color: $color-link;
position: relative;
z-index: 120;
}
.externallink:visited {
color: $color-link-visited;
Expand Down Expand Up @@ -568,7 +564,6 @@ hr {

.event-wrapper {
border-radius: 10px;
overflow: hidden;
}

.event-top {
Expand All @@ -577,6 +572,13 @@ hr {
background-color: $color-chat-emphasize;
justify-content: space-between;
align-items: center;
border-top-right-radius: 10px;
border-top-left-radius: 10px;

&.no-bottom {
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
}
}

.event-icon {
Expand All @@ -594,6 +596,8 @@ hr {
.event-bottom {
padding: $gutter-xs $gutter-md * 2 $gutter-xs $gutter-md;
background-color: $color-chat-bg;
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
}

.user {
Expand Down Expand Up @@ -948,7 +952,6 @@ hr {
}
}
.emote {
z-index: 1;
display: inline-block;
position: relative;
overflow: hidden;
Expand Down
1 change: 1 addition & 0 deletions assets/chat/js/messages/ChatEventMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default class ChatEventMessage extends ChatMessage {
this.buildMessageTxt(chat);
} else {
eventTemplate.querySelector('.event-bottom').remove();
eventTemplate.querySelector('.event-top').classList.toggle('no-bottom');
}

return eventTemplate;
Expand Down

0 comments on commit 7624724

Please sign in to comment.