mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-11-13 23:56:00 -06:00
Some checks failed
E2E Tests / e2e (push) Has been cancelled
E2E Tests / publish-docs-screenshots (push) Has been cancelled
Tests and checks on push / run-checks-and-tests (push) Has been cancelled
Updates translation progress / update-translation-progress-issue (push) Has been cancelled
Co-authored-by: Kalle <38327916+Sendouc@users.noreply.github.com>
202 lines
4.0 KiB
CSS
202 lines
4.0 KiB
CSS
/* sized by the room the header has left, which the collapse thresholds below and in the children measure */
|
|
.container {
|
|
container-type: inline-size;
|
|
flex: 1;
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
gap: var(--s-4);
|
|
min-width: 0;
|
|
}
|
|
|
|
.supportWrapper {
|
|
flex-shrink: 0;
|
|
|
|
@media screen and (max-width: 599px) {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.supportWrapperCompact {
|
|
display: none;
|
|
}
|
|
|
|
@media screen and (min-width: 600px) {
|
|
@container (width < 360px) {
|
|
.supportWrapper {
|
|
display: none;
|
|
}
|
|
|
|
.supportWrapperCompact {
|
|
display: block;
|
|
}
|
|
}
|
|
|
|
@container (width < 540px) {
|
|
.container:has(.activities:not(:empty)) .supportWrapper {
|
|
display: none;
|
|
}
|
|
|
|
.container:has(.activities:not(:empty)) .supportWrapperCompact {
|
|
display: block;
|
|
}
|
|
}
|
|
}
|
|
|
|
.activities {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--s-0-5);
|
|
height: var(--field-size-sm);
|
|
padding-inline: var(--s-0-5);
|
|
border: 1px solid var(--color-border);
|
|
border-radius: var(--radius-field);
|
|
background-color: var(--color-bg);
|
|
flex-shrink: 0;
|
|
|
|
@media (prefers-reduced-motion: no-preference) {
|
|
transition-property: padding-inline, border-inline-width, margin-inline-end;
|
|
transition-duration: 150ms;
|
|
}
|
|
|
|
/* collapsed (cancelling the gap) when empty or only holding activities animating out, the delay waits for their fade */
|
|
&:not(:has(> :not([data-presence="exit"]))) {
|
|
padding-inline: 0;
|
|
border-inline-width: 0;
|
|
margin-inline-end: calc(-1 * var(--s-2));
|
|
transition-delay: 150ms;
|
|
}
|
|
}
|
|
|
|
.searchAndAddContainer {
|
|
display: flex;
|
|
gap: var(--s-2);
|
|
min-width: 0;
|
|
}
|
|
|
|
/* gives up its keyboard hint before the status text starts truncating, the thresholds below switch it to an icon */
|
|
.searchWrapper {
|
|
container-type: inline-size;
|
|
width: 10rem;
|
|
min-width: 6rem;
|
|
flex-shrink: 999999;
|
|
}
|
|
|
|
/* attached to add new */
|
|
.searchWrapper:not(:last-child) {
|
|
margin-inline-end: calc(-1 * var(--s-2));
|
|
|
|
& > a {
|
|
border-inline-end: none;
|
|
border-start-end-radius: 0;
|
|
border-end-end-radius: 0;
|
|
}
|
|
}
|
|
|
|
@media screen and (max-width: 599px) {
|
|
@container (width < 371px) {
|
|
.container:has(.activities:not(:empty)) .searchWrapper {
|
|
width: var(--field-size-sm);
|
|
min-width: 0;
|
|
flex-shrink: 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
@media screen and (min-width: 600px) {
|
|
@container (width < 296px) {
|
|
.searchWrapper {
|
|
width: var(--field-size-sm);
|
|
min-width: 0;
|
|
flex-shrink: 0;
|
|
}
|
|
}
|
|
|
|
@container (width < 470px) {
|
|
.container:has(.activities:not(:empty)) .searchWrapper {
|
|
width: var(--field-size-sm);
|
|
min-width: 0;
|
|
flex-shrink: 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
.chatButtonWrapperPersistent {
|
|
display: none;
|
|
flex-shrink: 0;
|
|
position: relative;
|
|
|
|
@media screen and (min-width: 1000px) {
|
|
display: block;
|
|
}
|
|
|
|
& > button {
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
.chatButtonWrapperModal {
|
|
display: none;
|
|
flex-shrink: 0;
|
|
position: relative;
|
|
|
|
@media screen and (min-width: 600px) and (max-width: 999px) {
|
|
display: block;
|
|
}
|
|
|
|
& > button {
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
.chatUnreadBadge {
|
|
position: absolute;
|
|
top: -6px;
|
|
right: -6px;
|
|
font-size: var(--font-2xs);
|
|
font-weight: var(--weight-bold);
|
|
color: var(--color-fg-on-accent);
|
|
background-color: var(--color-fill-accent);
|
|
min-width: 18px;
|
|
height: 18px;
|
|
padding: 0 var(--s-1);
|
|
border-radius: 9px;
|
|
display: grid;
|
|
place-items: center;
|
|
pointer-events: none;
|
|
}
|
|
|
|
@media screen and (display-mode: standalone) {
|
|
.chatSidebarModal {
|
|
top: calc(var(--layout-nav-height) + env(safe-area-inset-top));
|
|
height: calc(100% - var(--layout-nav-height) - env(safe-area-inset-top));
|
|
|
|
&::backdrop {
|
|
top: calc(var(--layout-nav-height) + env(safe-area-inset-top));
|
|
}
|
|
}
|
|
}
|
|
|
|
.chatSidebarModal {
|
|
position: fixed;
|
|
inset: 0;
|
|
top: var(--layout-nav-height);
|
|
margin: 0;
|
|
margin-left: auto;
|
|
padding: 0;
|
|
max-width: none;
|
|
max-height: none;
|
|
height: calc(100% - var(--layout-nav-height));
|
|
width: var(--layout-sidenav-width);
|
|
border: none;
|
|
border-left: 1.5px solid var(--color-border);
|
|
background-color: var(--color-bg-nav);
|
|
color: var(--color-text);
|
|
outline: none;
|
|
|
|
&::backdrop {
|
|
background-color: rgba(0, 0, 0, 0.4);
|
|
backdrop-filter: blur(4px);
|
|
top: var(--layout-nav-height);
|
|
}
|
|
}
|