treehouse/static/css/components/chat.css

100 lines
2.4 KiB
CSS
Raw Normal View History

2024-03-24 18:08:47 +01:00
:root {
--icon-choose: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYgMTJMMTAgOEw2IDQiIHN0cm9rZT0iIzU1NDIzZSIgc3Ryb2tlLXdpZHRoPSIyIi8+Cjwvc3ZnPgo=");
2024-03-24 18:08:47 +01:00
}
@media (prefers-color-scheme: dark) {
:root {
--icon-choose: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYgMTJMMTAgOEw2IDQiIHN0cm9rZT0iI2Q3Y2RiZiIgc3Ryb2tlLXdpZHRoPSIyIi8+Cjwvc3ZnPgo=");
2024-03-24 18:08:47 +01:00
}
}
th-chat {
display: flex;
flex-direction: column;
}
th-chat-said {
2024-03-24 22:27:06 +01:00
display: flex;
flex-direction: row;
align-items: center;
2024-03-24 18:08:47 +01:00
border: 0.1rem solid var(--border-1);
padding: 1.2rem 1.6rem;
margin: 0.8rem 0;
border-radius: 0.8rem;
2024-03-24 18:08:47 +01:00
max-width: 60%;
2024-03-24 22:27:06 +01:00
& > .picture {
padding-right: 1.6rem;
2024-03-24 22:27:06 +01:00
align-self: baseline;
}
& > .text-container {
2024-03-24 22:27:06 +01:00
display: inline-block;
}
2024-03-24 18:08:47 +01:00
}
th-chat-asked {
display: flex;
flex-direction: row-reverse;
& > button {
2024-03-24 18:08:47 +01:00
/* Reset <button> */
border: none;
background: none;
color: var(--text-color);
2024-03-24 18:26:25 +01:00
user-select: auto;
2024-03-24 18:08:47 +01:00
padding: 0.5em 0;
margin-right: 2rem;
--recursive-wght: 500;
text-decoration: underline;
text-align: right;
opacity: 80%;
cursor: pointer;
transition: opacity var(--transition-duration);
&.asked {
display: none;
opacity: 50%;
}
&[disabled] {
--recursive-wght: 600;
cursor: default;
opacity: 100%;
text-decoration: none;
}
&:hover {
opacity: 100%;
}
&::before {
content: "";
2024-03-24 18:08:47 +01:00
display: inline-block;
width: 1.6rem;
height: 1.6rem;
2024-03-24 18:08:47 +01:00
margin-right: 0.5em;
background-image: var(--icon-choose);
background-position: 50% 50%;
background-repeat: no-repeat;
opacity: 0%;
vertical-align: middle;
translate: -1em 0;
transition:
opacity var(--transition-duration),
translate var(--transition-duration);
2024-03-24 18:08:47 +01:00
}
2024-06-13 21:50:09 +02:00
&:hover::before,
&[disabled]::before {
2024-03-24 18:08:47 +01:00
opacity: 50%;
translate: 0 0;
}
}
}