mediawiki-skins-Citizen/resources/skins.citizen.styles/Stickyheader.less
2022-11-21 17:46:09 -05:00

95 lines
1.8 KiB
Plaintext

#citizen-body-header-sticky-sentinel {
position: absolute;
right: 0;
left: 0;
height: 1px;
visibility: hidden;
}
.ve-activated,
.action-edit {
// HACK: So sticky header will never trigger in edit action
#citizen-body-header-sticky-sentinel {
display: none;
}
}
.citizen-body-header--sticky {
.mw-body-header {
position: sticky;
top: 0;
padding-bottom: var( --space-md );
border-bottom: 1px solid var( --border-color-base );
.mw-indicators {
display: none;
}
// HACK: Hide overflow
&:before {
position: absolute;
right: ~'calc( var(--padding-page ) * -1 )';
left: ~'calc( var(--padding-page ) * -1 )';
height: 100%;
backdrop-filter: saturate( 50% ) blur( 16px );
background-color: var( --background-color-overlay );
content: '';
}
}
.page-heading {
position: relative;
}
.firstHeading {
font-size: var( --font-size-h3 );
transition: font-size @transition-timing-fast ease;
}
.citizen-jumptotop {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
border-radius: var( --border-radius--small );
margin: ~'calc( var( --space-xs ) * -1 )';
&:hover {
background-color: var( --background-color-quiet--hover );
}
&:active {
background-color: var( --background-color-quiet--active );
}
}
}
// Hide sticky header on scroll down on smaller screens
@media ( max-width: @width-breakpoint-tablet ) {
.citizen-body-header--sticky {
.mw-body-header {
transition: @transition-transform;
}
&.citizen-scroll--down {
.mw-body-header {
transform: translateY( -100% );
}
}
}
}
// Make sticky header more compact if there are less screen estate
@media ( max-width: @width-breakpoint-tablet ), ( max-height: 800px ) {
.citizen-body-header--sticky {
#siteSub {
display: none;
}
.page-actions {
display: none;
}
}
}