mediawiki-skins-Citizen/resources/skins.citizen.styles/Drawer.less
2022-09-30 16:52:13 -04:00

115 lines
2.1 KiB
Plaintext

.citizen-drawer {
&__card {
.citizen-header-card( left );
}
&__header {
display: flex;
align-items: center;
justify-content: center;
padding: var( --header-button-size ) var( --padding-page ) 0.8rem; // TODO: Replace with space token
border-bottom: 1px solid var( --border-color-base );
gap: 1.25rem;
}
// Keep aspect ratio
&__logo img {
width: auto;
height: 3rem;
}
&__siteinfo {
.mw-logo-wordmark {
margin-top: 0.375rem;
color: var( --color-base--emphasized );
font-size: 1.5rem;
}
}
&__menu {
display: grid;
max-width: 92vw;
justify-content: center;
padding: 0.625rem 0.625rem 1.25rem 0.625rem; // TODO: Replace with space token
font-size: 0.875rem; // TODO: Make this a variable
gap: 0.625rem; // TODO: Replace with space token
grid-template-columns: repeat( auto-fit, 15rem );
a {
.menu-item-link;
padding: 0.625rem 1.25rem; // TODO: Make this a variable
border-radius: var( --border-radius--small );
&:after {
.resource-loader-list-icon;
display: block;
background-size: contain;
opacity: var( --opacity-icon-base );
transition: @transition-opacity;
}
&:hover {
.menu-item-link-hover;
&:after {
opacity: var( --opacity-icon-base--hover );
}
}
&:active {
.menu-item-link-active;
&:after {
opacity: var( --opacity-icon-base--active );
}
}
}
}
}
// Checkbox hack
#citizen-drawer__checkbox:checked {
~ .citizen-drawer__card {
.citizen-card-show;
}
}
// Wait for first paint before animating
.citizen-animations-ready {
.citizen-drawer__card {
.citizen-card-transition();
}
}
.skin-citizen-dark {
// Icons in nav links
.citizen-drawer__menu a:after {
filter: invert( 1 );
}
}
@media ( min-width: @width-breakpoint-tablet ) {
.citizen-drawer {
&__logo img {
// Bigger logo
height: 5rem;
}
&__siteinfo {
.mw-logo-wordmark {
font-size: 2rem;
// Sometimes long wiki name will wrap when the menu is too small
white-space: nowrap;
}
}
}
}
@media ( min-width: @width-breakpoint-desktop ) {
.citizen-drawer {
&__header {
justify-content: flex-start;
}
}
}