2022-09-30 02:33:06 +00:00
|
|
|
#citizen-body-header-sticky-sentinel {
|
|
|
|
right: 0;
|
|
|
|
left: 0;
|
2022-12-06 21:57:22 +00:00
|
|
|
grid-area: content; // align right above content
|
2023-07-28 01:19:27 +00:00
|
|
|
height: 1px;
|
2022-12-06 21:58:01 +00:00
|
|
|
visibility: hidden;
|
2023-07-28 01:19:27 +00:00
|
|
|
contain: strict;
|
2022-09-30 02:33:06 +00:00
|
|
|
}
|
|
|
|
|
2022-09-30 14:47:19 +00:00
|
|
|
.ve-activated,
|
|
|
|
.action-edit {
|
|
|
|
// HACK: So sticky header will never trigger in edit action
|
|
|
|
#citizen-body-header-sticky-sentinel {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-09-30 02:33:06 +00:00
|
|
|
.citizen-body-header--sticky {
|
|
|
|
.mw-body-header {
|
2022-12-20 20:53:43 +00:00
|
|
|
flex-wrap: nowrap;
|
2022-12-20 20:54:59 +00:00
|
|
|
padding-bottom: var( --space-md );
|
2022-12-20 21:36:13 +00:00
|
|
|
white-space: nowrap;
|
2022-11-25 01:14:44 +00:00
|
|
|
.citizen-sticky-header;
|
2022-09-30 14:47:19 +00:00
|
|
|
|
|
|
|
.mw-indicators {
|
|
|
|
display: none;
|
|
|
|
}
|
2022-09-30 02:33:06 +00:00
|
|
|
}
|
|
|
|
|
2022-09-30 15:24:06 +00:00
|
|
|
.page-heading {
|
|
|
|
position: relative;
|
2022-12-20 20:53:43 +00:00
|
|
|
min-width: 0;
|
2022-09-30 15:24:06 +00:00
|
|
|
}
|
|
|
|
|
2022-09-30 02:33:06 +00:00
|
|
|
.firstHeading {
|
2022-12-20 20:53:43 +00:00
|
|
|
overflow: hidden;
|
2024-02-26 21:54:58 +00:00
|
|
|
font-size: var( --font-size-x-large );
|
2022-12-20 20:54:59 +00:00
|
|
|
text-overflow: ellipsis;
|
2022-09-30 02:33:06 +00:00
|
|
|
}
|
2022-09-30 15:24:06 +00:00
|
|
|
|
|
|
|
.citizen-jumptotop {
|
|
|
|
position: absolute;
|
2023-07-28 01:19:27 +00:00
|
|
|
inset: 0 0 0 0;
|
2022-11-01 00:34:00 +00:00
|
|
|
margin: ~'calc( var( --space-xs ) * -1 )';
|
2023-07-28 01:19:27 +00:00
|
|
|
border-radius: var( --border-radius--small );
|
2022-09-30 15:24:06 +00:00
|
|
|
|
|
|
|
&:hover {
|
|
|
|
background-color: var( --background-color-quiet--hover );
|
|
|
|
}
|
|
|
|
|
|
|
|
&:active {
|
|
|
|
background-color: var( --background-color-quiet--active );
|
|
|
|
}
|
|
|
|
}
|
2022-09-30 14:24:16 +00:00
|
|
|
}
|
|
|
|
|
2022-11-10 01:02:21 +00:00
|
|
|
// Hide sticky header on scroll down on smaller screens
|
2023-11-16 22:55:23 +00:00
|
|
|
@media ( max-width: @max-width-breakpoint-tablet ) {
|
2022-11-10 01:02:21 +00:00
|
|
|
.citizen-body-header--sticky {
|
2024-04-26 21:42:26 +00:00
|
|
|
.mw-body-header .page-actions {
|
2023-07-07 21:02:27 +00:00
|
|
|
transition: var( --transition-menu );
|
2024-04-26 21:41:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.mw-body-header {
|
2023-07-07 21:02:27 +00:00
|
|
|
transition-property: transform;
|
2022-11-10 01:02:21 +00:00
|
|
|
}
|
|
|
|
|
2024-04-26 21:41:27 +00:00
|
|
|
// FIXME: Fine tune the animation, the position jump is annoying
|
|
|
|
.page-actions {
|
|
|
|
visibility: visible;
|
2024-04-26 21:42:26 +00:00
|
|
|
opacity: 1;
|
2024-04-26 21:41:27 +00:00
|
|
|
transition-property: opacity, visibility;
|
|
|
|
}
|
|
|
|
|
2022-11-10 01:02:21 +00:00
|
|
|
&.citizen-scroll--down {
|
|
|
|
.mw-body-header {
|
|
|
|
transform: translateY( -100% );
|
|
|
|
}
|
2024-04-26 19:57:29 +00:00
|
|
|
|
2024-04-26 21:41:27 +00:00
|
|
|
.page-actions {
|
|
|
|
visibility: hidden;
|
2024-04-26 21:42:26 +00:00
|
|
|
opacity: 0;
|
2024-04-26 21:41:27 +00:00
|
|
|
}
|
2024-04-26 19:57:29 +00:00
|
|
|
}
|
2022-11-10 01:02:21 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Make sticky header more compact if there are less screen estate
|
2024-04-26 19:57:29 +00:00
|
|
|
@media ( max-height: 800px ) {
|
2022-09-30 14:24:16 +00:00
|
|
|
.citizen-body-header--sticky {
|
2024-04-26 19:57:29 +00:00
|
|
|
.mw-body-header {
|
|
|
|
padding-top: var( --space-sm );
|
|
|
|
padding-bottom: var( --space-sm );
|
2022-09-30 14:24:16 +00:00
|
|
|
}
|
2022-09-30 02:33:06 +00:00
|
|
|
|
2024-04-26 19:57:29 +00:00
|
|
|
.firstHeading {
|
|
|
|
font-size: var( --font-size-medium );
|
2022-09-30 14:24:16 +00:00
|
|
|
}
|
2022-09-30 02:33:06 +00:00
|
|
|
}
|
|
|
|
}
|