2022-05-10 00:23:42 +00:00
|
|
|
.citizen-header {
|
2022-09-29 23:12:56 +00:00
|
|
|
--header-icon-size: ~'calc( var( --header-button-size ) / 2 )';
|
2022-11-01 00:34:00 +00:00
|
|
|
--header-button-size: ~'calc( var( --header-size ) - var( --space-xs ) * 2 )';
|
2022-09-29 23:12:56 +00:00
|
|
|
--header-direction: row;
|
2020-06-07 05:30:54 +00:00
|
|
|
position: fixed;
|
2021-01-16 00:56:59 +00:00
|
|
|
right: 0;
|
2022-09-29 23:12:56 +00:00
|
|
|
bottom: 0;
|
2021-01-16 00:56:59 +00:00
|
|
|
left: 0;
|
2024-07-09 20:44:15 +00:00
|
|
|
z-index: @z-index-fixed;
|
2021-01-11 16:45:52 +00:00
|
|
|
display: flex;
|
2022-09-29 23:12:56 +00:00
|
|
|
flex-direction: var( --header-direction );
|
2023-07-28 01:19:27 +00:00
|
|
|
gap: var( --space-xxs );
|
2022-11-01 00:34:00 +00:00
|
|
|
padding: var( --space-xs );
|
2022-09-29 23:12:56 +00:00
|
|
|
background-color: var( --color-surface-0 );
|
2023-07-28 01:19:27 +00:00
|
|
|
border-top: 1px solid var( --border-color-base );
|
2022-05-10 00:23:42 +00:00
|
|
|
|
|
|
|
&__item {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
&__button {
|
|
|
|
display: grid;
|
2023-07-28 01:19:27 +00:00
|
|
|
place-items: center;
|
2022-09-29 23:12:56 +00:00
|
|
|
width: var( --header-button-size );
|
|
|
|
height: var( --header-button-size );
|
2024-07-05 17:24:31 +00:00
|
|
|
border-radius: var( --border-radius-base );
|
2022-12-06 20:29:49 +00:00
|
|
|
contain: strict;
|
2022-05-10 00:23:42 +00:00
|
|
|
|
2022-05-10 15:56:50 +00:00
|
|
|
// Pure CSS icons
|
2022-05-10 00:23:42 +00:00
|
|
|
&Icon {
|
2022-09-29 23:12:56 +00:00
|
|
|
width: var( --header-icon-size );
|
|
|
|
height: var( --header-icon-size );
|
2023-07-28 01:19:27 +00:00
|
|
|
overflow: hidden; // Sometimes CSS animation can clip
|
2023-07-10 20:56:56 +00:00
|
|
|
filter: var( --filter-invert );
|
2023-07-28 01:19:27 +00:00
|
|
|
contain: strict;
|
2022-05-10 15:56:50 +00:00
|
|
|
}
|
|
|
|
|
2023-06-22 17:49:26 +00:00
|
|
|
&Icon,
|
|
|
|
.citizen-ui-icon {
|
|
|
|
margin: auto;
|
|
|
|
}
|
|
|
|
|
2022-05-10 15:56:50 +00:00
|
|
|
&Icon,
|
2023-02-28 21:59:36 +00:00
|
|
|
.citizen-ui-icon::before {
|
2022-05-10 15:56:50 +00:00
|
|
|
opacity: var( --opacity-icon-base );
|
2023-07-07 20:36:27 +00:00
|
|
|
transition: var( --transition-hover );
|
|
|
|
transition-property: transform, opacity;
|
2022-05-10 15:56:50 +00:00
|
|
|
}
|
|
|
|
|
2022-05-10 00:23:42 +00:00
|
|
|
&:hover {
|
2024-07-01 00:41:31 +00:00
|
|
|
background-color: var( --background-color-button-quiet--hover );
|
2022-05-10 15:56:50 +00:00
|
|
|
|
2023-02-28 21:59:36 +00:00
|
|
|
.citizen-ui-icon::before,
|
2022-11-03 22:30:41 +00:00
|
|
|
.citizen-header__buttonIcon {
|
2022-05-10 15:56:50 +00:00
|
|
|
opacity: var( --opacity-icon-base--hover );
|
|
|
|
}
|
2022-05-10 00:23:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:active {
|
2024-07-01 00:41:31 +00:00
|
|
|
background-color: var( --background-color-button-quiet--active );
|
2022-05-10 15:56:50 +00:00
|
|
|
|
2023-02-28 21:59:36 +00:00
|
|
|
.citizen-ui-icon::before,
|
2022-11-03 22:30:41 +00:00
|
|
|
.citizen-header__buttonIcon {
|
2024-06-30 05:04:30 +00:00
|
|
|
opacity: var( --opacity-icon-base--selected );
|
2022-05-10 15:56:50 +00:00
|
|
|
}
|
2022-05-10 00:23:42 +00:00
|
|
|
}
|
2024-05-06 19:28:56 +00:00
|
|
|
|
|
|
|
// Disable default padding when menu item is used as header button
|
|
|
|
.citizen-menu .mw-list-item & {
|
|
|
|
padding: 0;
|
|
|
|
}
|
2022-05-10 00:23:42 +00:00
|
|
|
}
|
2022-05-10 14:50:01 +00:00
|
|
|
|
2022-12-03 17:39:17 +00:00
|
|
|
&__logo {
|
|
|
|
padding: 0 var( --space-xs ) 0 0;
|
|
|
|
margin: 0 var( --space-xxs );
|
2023-07-28 01:19:27 +00:00
|
|
|
border-right: 1px solid var( --border-color-base );
|
2023-06-22 17:49:26 +00:00
|
|
|
|
|
|
|
img {
|
|
|
|
margin: auto;
|
|
|
|
}
|
2022-12-03 17:39:17 +00:00
|
|
|
}
|
|
|
|
|
2022-05-10 14:50:01 +00:00
|
|
|
&__inner {
|
|
|
|
display: flex;
|
2022-09-29 23:12:56 +00:00
|
|
|
flex-direction: var( --header-direction );
|
2022-05-10 14:50:01 +00:00
|
|
|
flex-grow: 1;
|
2022-11-01 00:34:00 +00:00
|
|
|
gap: var( --space-xxs );
|
2023-07-28 01:19:27 +00:00
|
|
|
justify-content: space-between;
|
|
|
|
min-width: 0;
|
2023-07-20 22:17:14 +00:00
|
|
|
overflow-x: auto;
|
2022-05-10 14:50:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&__start,
|
|
|
|
&__end {
|
|
|
|
display: flex;
|
2022-09-29 23:12:56 +00:00
|
|
|
flex-direction: var( --header-direction );
|
2023-07-20 22:17:14 +00:00
|
|
|
flex-shrink: 0; // let _inner handle the overflow
|
2022-11-01 00:34:00 +00:00
|
|
|
gap: var( --space-xxs );
|
2024-04-25 22:26:54 +00:00
|
|
|
|
|
|
|
// Hide top-level menu header labels
|
|
|
|
> .citizen-menu > .citizen-menu__heading {
|
2024-07-03 18:41:14 +00:00
|
|
|
.sr-only;
|
2024-04-25 22:26:54 +00:00
|
|
|
}
|
2022-05-10 14:50:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&__start {
|
2022-05-10 16:55:20 +00:00
|
|
|
align-items: center;
|
2023-07-28 01:19:27 +00:00
|
|
|
min-width: 0;
|
2022-05-10 14:50:01 +00:00
|
|
|
}
|
2024-05-30 06:19:53 +00:00
|
|
|
|
2024-07-03 20:07:08 +00:00
|
|
|
.citizen-dropdown {
|
|
|
|
&-summary {
|
|
|
|
display: grid;
|
|
|
|
place-items: center;
|
|
|
|
width: var( --header-button-size );
|
|
|
|
height: var( --header-button-size );
|
2024-07-05 17:24:31 +00:00
|
|
|
border-radius: var( --border-radius-base );
|
2024-07-03 20:07:08 +00:00
|
|
|
contain: strict;
|
2024-05-30 06:19:53 +00:00
|
|
|
}
|
|
|
|
}
|
2022-05-10 14:50:01 +00:00
|
|
|
}
|
|
|
|
|
2022-05-17 02:52:04 +00:00
|
|
|
// Notifications
|
|
|
|
#p-notifications {
|
2020-06-07 05:30:54 +00:00
|
|
|
ul {
|
|
|
|
display: flex;
|
2022-09-29 23:12:56 +00:00
|
|
|
flex-direction: var( --header-direction );
|
2022-11-01 00:34:00 +00:00
|
|
|
gap: var( --space-xxs );
|
2023-07-28 01:19:27 +00:00
|
|
|
align-items: center;
|
2020-06-07 05:30:54 +00:00
|
|
|
}
|
2024-05-06 19:28:56 +00:00
|
|
|
|
|
|
|
// Echo badge styles do not load before init in 1.39
|
2024-07-06 00:37:52 +00:00
|
|
|
.citizen-echo-notification-badge {
|
2024-05-06 19:28:56 +00:00
|
|
|
.citizen-ui-icon + span {
|
2024-07-03 18:41:14 +00:00
|
|
|
.sr-only;
|
2024-05-06 19:28:56 +00:00
|
|
|
}
|
|
|
|
}
|
2020-06-07 05:30:54 +00:00
|
|
|
}
|
2021-05-04 17:27:47 +00:00
|
|
|
|
2022-05-10 17:37:38 +00:00
|
|
|
// Reset hover styles if it is a touch device
|
|
|
|
// This is dumb but hover:hover overrides active states
|
|
|
|
@media ( hover: none ) {
|
|
|
|
.citizen-header {
|
|
|
|
&__button {
|
|
|
|
&:hover {
|
2024-07-03 18:20:20 +00:00
|
|
|
background-color: transparent;
|
2022-05-10 17:37:38 +00:00
|
|
|
|
2022-11-03 22:30:41 +00:00
|
|
|
.citizen-header__buttonIcon {
|
2022-05-10 17:37:38 +00:00
|
|
|
opacity: var( --opacity-icon-base );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-09-29 23:12:56 +00:00
|
|
|
}
|
|
|
|
}
|
2022-05-10 17:37:38 +00:00
|
|
|
|
2023-11-16 22:55:23 +00:00
|
|
|
@media ( min-width: @min-width-breakpoint-desktop ) {
|
2022-09-29 23:12:56 +00:00
|
|
|
.citizen-header {
|
|
|
|
--header-direction: column;
|
|
|
|
top: 0;
|
|
|
|
right: unset;
|
|
|
|
left: 0;
|
|
|
|
border-top: 0;
|
|
|
|
border-right: 1px solid var( --border-color-base );
|
2022-12-03 17:39:17 +00:00
|
|
|
|
|
|
|
&__logo {
|
|
|
|
padding: 0 0 var( --space-xs ) 0;
|
2023-07-28 01:19:27 +00:00
|
|
|
margin: var( --space-xxs ) 0;
|
2022-12-03 17:39:17 +00:00
|
|
|
border-right: 0;
|
|
|
|
border-bottom: 1px solid var( --border-color-base );
|
|
|
|
}
|
2021-05-04 17:27:47 +00:00
|
|
|
}
|
|
|
|
}
|
2022-11-10 01:02:21 +00:00
|
|
|
|
|
|
|
/* Hide header when scroll down on smaller screen sizes */
|
2023-11-16 22:55:23 +00:00
|
|
|
@media ( max-width: @max-width-breakpoint-tablet ) {
|
2022-11-10 01:02:21 +00:00
|
|
|
.citizen-header {
|
2023-07-07 21:02:27 +00:00
|
|
|
transition: var( --transition-menu );
|
|
|
|
transition-property: transform;
|
2022-11-10 01:02:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.citizen-scroll--down .citizen-header {
|
|
|
|
transform: translateY( 100% );
|
|
|
|
}
|
|
|
|
}
|