sendou.ink/app/styles/layout.css
Kalle fd48bced91
Migrate Prettier/Eslint/Stylelint setup to Biome (#1772)
* Initial

* CSS lint

* Test CI

* Add 1v1, 2v2, and 3v3 Tags (#1771)

* Initial

* CSS lint

* Test CI

* Rename step

---------

Co-authored-by: xi <104683822+ximk@users.noreply.github.com>
2024-06-24 13:07:17 +03:00

391 lines
7.3 KiB
CSS

.layout__container {
display: flex;
flex-direction: column;
width: 100%;
min-height: 100vh;
}
.layout__breadcrumb-container {
display: flex;
/** check if should use px or not */
height: 30px;
align-items: center;
gap: var(--s-2);
}
.layout__breadcrumb {
overflow: hidden;
max-width: 350px;
color: var(--text);
font-size: var(--fonts-xs);
font-weight: 600;
text-overflow: ellipsis;
white-space: nowrap;
}
.layout__breadcrumb__image {
min-width: 24px;
}
.layout__breadcrumb.logo {
overflow: initial;
}
.layout__breadcrumb-separator {
font-size: 20px;
opacity: 0.4;
margin-inline-start: -1px;
}
.layout__item_size {
--item-size: 1.9rem;
}
.layout__header {
z-index: 501;
display: flex;
width: 100%;
align-items: center;
justify-content: space-between;
border-bottom: 1.5px solid var(--border);
-webkit-backdrop-filter: var(--backdrop-filter);
backdrop-filter: var(--backdrop-filter);
background-color: transparent;
font-weight: bold;
padding-block: var(--s-2);
padding-inline: var(--s-4);
position: sticky;
top: 0;
}
.layout__avatar {
width: var(--item-size);
height: var(--item-size);
color: transparent;
}
.layout__page-heading {
display: flex;
align-items: center;
font-size: var(--fonts-md);
font-weight: var(--bold);
gap: var(--s-2-5);
letter-spacing: 0.02rem;
}
.layout__header__right-container {
display: flex;
gap: var(--s-3);
justify-self: flex-end;
}
.layout__header__button {
width: var(--item-size);
height: var(--item-size);
padding: 0.25rem;
border: 2px solid;
border-color: var(--theme-transparent);
border-radius: 50%;
background-color: transparent;
color: inherit;
cursor: pointer;
}
.layout__header__button__icon {
width: 1.15rem;
}
.main {
width: 100%;
max-width: 48rem;
margin: 0 auto;
padding-inline: var(--s-3);
}
.half-width {
width: 100%;
max-width: 24rem;
margin: 0 auto;
}
.bigger {
width: 100%;
max-width: 72rem;
margin: 0 auto;
}
.layout__main-container {
display: flex;
flex-direction: row;
}
.layout__main {
padding-block: var(--s-4) var(--s-32);
}
.layout__log-in-button {
display: flex;
height: var(--item-size);
align-items: center;
justify-content: center;
padding: 0.5rem;
border: 2px solid;
border-color: var(--theme-transparent);
border-radius: var(--rounded);
background-color: transparent;
color: inherit;
cursor: pointer;
font-size: var(--fonts-xs);
font-weight: var(--bold);
gap: var(--s-2);
text-decoration: none;
}
.layout__log-in-button > svg {
width: 1rem;
}
.layout__log-in-button:active {
transform: translateY(1px);
}
.layout__user-popover {
display: flex;
flex-direction: column;
padding: var(--s-2);
border-radius: var(--rounded);
background-color: var(--bg-darker);
gap: var(--s-2);
}
.layout__user-popover > button:focus {
outline: 2px solid var(--theme);
}
.layout__footer {
display: flex;
flex-direction: column;
padding: var(--s-2-5);
background-color: var(--bg-lighter);
gap: var(--s-6);
margin-block-start: auto;
padding-block-end: var(--s-32);
}
.layout__footer__link-list {
display: flex;
justify-content: space-evenly;
font-size: var(--fonts-xxs);
}
.layout__footer__socials {
display: flex;
justify-content: center;
gap: var(--s-2);
}
.layout__footer__social-link {
display: flex;
max-width: 10rem;
height: 12rem;
flex: 1 1 0;
flex-direction: column;
align-items: center;
justify-content: space-between;
padding: var(--s-4);
border-radius: var(--rounded);
background-color: var(--theme-transparent);
cursor: pointer;
font-size: var(--fonts-lg);
}
.layout__footer__social-icon {
height: 2.25rem;
transition: transform 0.25s ease-in-out;
}
.layout__footer__social-link:hover > .layout__footer__social-icon {
transform: translateY(-0.3rem);
}
.layout__footer__social-header {
text-align: center;
}
.layout__footer__social-header > p {
font-size: var(--fonts-xxs);
}
.layout__footer__patron-title {
display: flex;
align-items: flex-end;
justify-content: center;
font-size: var(--fonts-sm);
font-weight: var(--semi-bold);
gap: var(--s-2);
}
.layout__footer__patron-list {
display: flex;
max-width: 75vw;
flex-wrap: wrap;
justify-content: center;
padding: 0;
margin: 0 auto;
font-size: var(--fonts-xs);
gap: var(--s-1);
list-style: none;
margin-block-start: var(--s-2);
}
.layout__footer__patron-list__patron {
max-width: 250px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: block;
}
.layout__copyright-note {
display: flex;
flex-direction: column;
color: var(--text-lighter);
font-size: var(--fonts-xxs);
text-align: center;
}
.layout__side-nav {
background: black;
display: flex;
flex-direction: column;
gap: var(--s-6);
padding-block: var(--s-3);
padding-inline: var(--s-4);
min-width: fit-content;
-webkit-backdrop-filter: var(--backdrop-filter);
backdrop-filter: var(--backdrop-filter);
background-color: transparent;
overflow: hidden auto;
direction: rtl;
position: sticky;
/*
Top pixel count needs to be the same as nav height
Max height is calculated using the viewport height minus the nav height
This is unfortunately needed to avoid the sidebar from overflowing the viewport or navbar
Without this, the sidebar would be cut off at the bottom or top or clip into it
Will return if a better solution is found that doesnt require a hard coded value
*/
top: 47px;
max-height: calc(100vh - 47px);
scrollbar-color: rgb(83 65 91) transparent;
scrollbar-width: thin;
scrollbar-gutter: stable;
}
/*
Works on literally every browser except Firefox
Firefox scrollbar styling is above in .layout__side-nav
*/
.layout__side-nav::-webkit-scrollbar {
width: 4px;
}
.layout__side-nav::-webkit-scrollbar-track {
background: black;
background-color: transparent;
}
.layout__side-nav::-webkit-scrollbar-corner {
background: black;
background-color: transparent;
}
.layout__side-nav::-webkit-scrollbar-thumb {
background-color: rgb(83 65 91);
border-radius: 4px;
}
.layout__side-nav::-webkit-scrollbar-thumb:hover {
background-color: rgb(62 49 68);
}
.layout__side-nav-image-container {
display: grid;
width: 40px;
height: 40px;
border-radius: var(--rounded);
background-color: var(--bg-lighter);
place-items: center;
transition: all 0.2s ease-out;
}
.layout__side-nav-image-container:hover {
background-color: var(--theme-transparent);
}
@media screen and (display-mode: standalone) {
.layout__header {
align-items: flex-end;
padding-top: env(safe-area-inset-top);
}
.layout__main {
padding-block-start: calc(
env(safe-area-inset-top) +
var(--leaderboard-top-spacing)
);
}
}
@media screen and (max-width: 950px) {
.layout__side-nav {
display: none;
}
}
@media screen and (max-width: 640px) {
.layout__header__right-container {
display: none;
}
.layout__breadcrumb-container > a {
max-width: 175px;
}
.layout__footer__socials {
flex-direction: column;
}
.layout__footer__social-link {
max-width: initial;
flex-direction: row;
}
.layout__footer__social-header {
display: flex;
align-items: center;
gap: var(--s-2);
text-align: initial;
}
.layout__footer__social-header > p {
margin-block-start: var(--s-1);
}
.layout__footer__social-icon {
height: 1.75rem;
}
.layout__footer__social-link:hover > .layout__footer__social-icon {
transform: translateX(-0.3rem);
}
}
@media screen and (max-width: 480px) {
.layout__breadcrumb-container {
width: 100%;
}
}