mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-12-01 09:26:53 +00:00
124 lines
2.5 KiB
Plaintext
124 lines
2.5 KiB
Plaintext
#citizen-page-header-sticky-sentinel {
|
|
grid-area: afterHeader; // align right above content
|
|
height: 1px;
|
|
margin-top: -1px;
|
|
visibility: hidden;
|
|
contain: strict;
|
|
}
|
|
|
|
#citizen-page-header-sticky-placeholder {
|
|
grid-area: afterHeader;
|
|
}
|
|
|
|
.ve-activated,
|
|
.action-edit {
|
|
// HACK: So sticky header will never trigger in edit action
|
|
#citizen-page-header-sticky-sentinel {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.citizen-page-header {
|
|
position: -webkit-sticky;
|
|
position: sticky;
|
|
|
|
&::before {
|
|
position: absolute;
|
|
top: 0;
|
|
right: ~'calc( var(--padding-page ) * -1 )';
|
|
left: ~'calc( var(--padding-page ) * -1 )';
|
|
z-index: -1;
|
|
height: 100%;
|
|
content: '';
|
|
background-color: var( --color-surface-0 );
|
|
filter: opacity( 0.9 );
|
|
backdrop-filter: saturate( 50% ) blur( 16px );
|
|
opacity: 0;
|
|
transition: var( --transition-hover );
|
|
transition-property: opacity;
|
|
}
|
|
}
|
|
|
|
.citizen-page-header--sticky {
|
|
.citizen-page-header {
|
|
top: 0;
|
|
flex-wrap: nowrap;
|
|
white-space: nowrap;
|
|
border-bottom: 1px solid var( --border-color-base );
|
|
|
|
&::before {
|
|
opacity: 1;
|
|
}
|
|
|
|
.mw-indicators {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.citizen-page-heading {
|
|
position: relative;
|
|
min-width: 0;
|
|
}
|
|
|
|
.firstHeading {
|
|
overflow: hidden;
|
|
font-size: var( --font-size-x-large );
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.citizen-jumptotop {
|
|
position: absolute;
|
|
inset: 0 0 0 0;
|
|
margin: ~'calc( var( --space-xs ) * -1 )';
|
|
border-radius: var( --border-radius-base );
|
|
|
|
&:hover {
|
|
background-color: var( --background-color-button-quiet--hover );
|
|
}
|
|
|
|
&:active {
|
|
background-color: var( --background-color-button-quiet--active );
|
|
}
|
|
}
|
|
}
|
|
|
|
// Hide sticky header on scroll down on smaller screens
|
|
@media ( max-width: @max-width-breakpoint-tablet ) {
|
|
.citizen-page-header {
|
|
.citizen-page-header--sticky & {
|
|
transition: var( --transition-menu );
|
|
transition-property: transform;
|
|
|
|
.citizen-page-heading {
|
|
opacity: 1;
|
|
transition: var( --transition-menu );
|
|
transition-delay: var( --transition-delay-menu );
|
|
transition-property: opacity;
|
|
}
|
|
}
|
|
|
|
.citizen-page-header--sticky.citizen-scroll--down & {
|
|
transform: translateY( -150% );
|
|
|
|
.citizen-page-heading {
|
|
opacity: 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Make sticky header more compact if there are less screen estate
|
|
@media ( max-height: 800px ) {
|
|
.citizen-page-header--sticky {
|
|
.citizen-page-header {
|
|
padding-top: var( --space-sm );
|
|
padding-bottom: var( --space-sm );
|
|
}
|
|
|
|
.firstHeading,
|
|
.mw-page-title-parenthesis {
|
|
font-size: var( --font-size-medium );
|
|
}
|
|
}
|
|
}
|