owncast/web/components/chat/ChatUserMessage/ChatUserMessage.module.scss

118 lines
2.1 KiB
SCSS
Raw Normal View History

2023-06-21 06:56:37 +03:00
$border-style: 3px solid currentcolor;
2022-10-22 11:44:15 +03:00
$p-size: 8px;
$p-h-size: 8px;
$p-v-size: 2px;
2022-05-22 17:10:34 +03:00
.root {
2022-07-10 09:56:31 +03:00
* {
2022-08-11 07:41:56 +03:00
z-index: 100;
}
2023-06-21 06:56:37 +03:00
// Chat messages are wrapped in <p> tags. We don't want to render
// the default margins for these initial <p> tags, so we remove them here.
p:nth-of-type(1) {
margin: initial;
}
border-left: $border-style;
position: relative;
font-size: var(--chat-message-text-size);
padding: $p-v-size $p-h-size;
color: var(--theme-color-components-chat-text);
2022-05-22 17:10:34 +03:00
.user {
display: flex;
align-items: center;
font-weight: 600;
2022-05-22 17:10:34 +03:00
}
.repeatUser {
// nolint: scss/at-extend-no-missing-placeholder
@extend .user;
display: none;
}
.userBadges {
margin-left: 3px;
display: flex;
justify-content: space-between;
> * {
margin-left: 3px;
}
}
2022-05-22 17:10:34 +03:00
.message {
overflow: hidden;
overflow-wrap: anywhere;
font-weight: 400;
position: relative;
mark {
padding-left: 0.3em;
padding-right: 0.3em;
color: var(--theme-color-palette-4);
border-radius: var(--chat-text-highlight-border-radius);
background-color: var(--color-owncast-palette-7);
}
a {
color: var(--theme-color-palette-12);
2023-06-21 06:56:37 +03:00
&:hover {
color: var(--theme-color-palette-4);
}
}
2022-05-22 17:10:34 +03:00
}
&.ownMessage {
border-left: none;
border-right: $border-style;
2022-07-02 10:56:03 +03:00
.background {
position: absolute;
2023-06-21 06:56:37 +03:00
top: 0;
left: 0;
2022-07-02 10:56:03 +03:00
width: 100%;
height: 100%;
2023-06-21 06:56:37 +03:00
background-color: currentcolor;
2022-07-02 10:56:03 +03:00
opacity: 0.07;
border-radius: 0.25rem;
overflow: hidden;
}
}
.modMenuWrapper {
position: absolute;
display: none;
top: 5px;
right: 10px;
color: black;
2023-06-21 06:56:37 +03:00
& button:focus,
& button:active {
display: block !important;
}
2023-01-19 07:23:12 +03:00
button {
background-color: white;
2023-01-19 07:23:12 +03:00
border-radius: var(--theme-rounded-corners);
border-width: 0;
opacity: 0.8;
2023-01-19 07:23:12 +03:00
}
}
&:hover .modMenuWrapper {
display: block;
}
}
2022-08-22 03:22:24 +03:00
.messagePadding {
2023-06-21 06:56:37 +03:00
padding: 0.4rem 5px 0;
}
.messagePaddingCollapsed {
2023-06-21 06:56:37 +03:00
padding: 2px 5px 0;
2022-08-22 03:22:24 +03:00
}