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;
|
2022-05-23 19:11:41 +00:00
|
|
|
z-index: @z-index-site-header;
|
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;
|
2021-01-11 16:45:52 +00:00
|
|
|
display: flex;
|
2022-09-29 23:12:56 +00:00
|
|
|
flex-direction: var( --header-direction );
|
2022-11-01 00:34:00 +00:00
|
|
|
padding: var( --space-xs );
|
2022-09-29 23:12:56 +00:00
|
|
|
border-top: 1px solid var( --border-color-base );
|
|
|
|
background-color: var( --color-surface-0 );
|
2022-11-01 00:34:00 +00:00
|
|
|
gap: var( --space-xxs );
|
2022-05-10 00:23:42 +00:00
|
|
|
|
|
|
|
&__item {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
&__button {
|
|
|
|
display: grid;
|
2022-09-29 23:12:56 +00:00
|
|
|
width: var( --header-button-size );
|
|
|
|
height: var( --header-button-size );
|
2022-05-10 00:23:42 +00:00
|
|
|
border-radius: var( --border-radius--small );
|
2022-12-06 20:29:49 +00:00
|
|
|
contain: strict;
|
2022-05-10 00:23:42 +00:00
|
|
|
place-items: center;
|
|
|
|
|
|
|
|
// Used in checkbox hack
|
|
|
|
&Checkbox {
|
|
|
|
position: absolute;
|
|
|
|
display: block;
|
|
|
|
width: inherit;
|
|
|
|
height: inherit;
|
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 {
|
|
|
|
overflow: hidden; // Sometimes CSS animation can clip
|
2022-09-29 23:12:56 +00:00
|
|
|
width: var( --header-icon-size );
|
|
|
|
height: var( --header-icon-size );
|
2022-12-06 20:29:49 +00:00
|
|
|
contain: strict;
|
2023-07-10 20:56:56 +00:00
|
|
|
filter: var( --filter-invert );
|
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 {
|
|
|
|
background-color: var( --background-color-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 {
|
|
|
|
background-color: var( --background-color-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 {
|
2022-05-10 15:56:50 +00:00
|
|
|
opacity: var( --opacity-icon-base--active );
|
|
|
|
}
|
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;
|
|
|
|
border-right: 1px solid var( --border-color-base );
|
|
|
|
margin: 0 var( --space-xxs );
|
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;
|
|
|
|
min-width: 0;
|
2022-09-29 23:12:56 +00:00
|
|
|
flex-direction: var( --header-direction );
|
2022-05-10 14:50:01 +00:00
|
|
|
flex-grow: 1;
|
|
|
|
justify-content: space-between;
|
2022-11-01 00:34:00 +00:00
|
|
|
gap: var( --space-xxs );
|
2023-07-20 22:17:14 +00:00
|
|
|
overflow-x: auto;
|
2022-05-10 16:55:20 +00:00
|
|
|
|
2023-01-26 01:25:40 +00:00
|
|
|
.citizen-menu-checkbox-checkbox:checked {
|
2022-05-10 16:55:20 +00:00
|
|
|
~ .citizen-header__button {
|
|
|
|
background-color: var( --background-color-primary--active );
|
|
|
|
}
|
|
|
|
}
|
2023-02-22 19:47:32 +00:00
|
|
|
|
|
|
|
// Hide header menu labels
|
|
|
|
.citizen-menu__heading {
|
|
|
|
.mixin-screen-reader-text;
|
|
|
|
}
|
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 );
|
2022-05-10 14:50:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&__start {
|
|
|
|
min-width: 0;
|
2022-05-10 16:55:20 +00:00
|
|
|
align-items: center;
|
2022-05-10 14:50:01 +00:00
|
|
|
}
|
|
|
|
|
2022-05-10 16:55:20 +00:00
|
|
|
// Reset
|
|
|
|
ul {
|
|
|
|
margin: 0;
|
|
|
|
list-style: none;
|
|
|
|
}
|
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 );
|
2020-06-07 05:30:54 +00:00
|
|
|
align-items: center;
|
2022-11-01 00:34:00 +00:00
|
|
|
gap: var( --space-xxs );
|
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 {
|
|
|
|
background-color: none;
|
|
|
|
|
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
|
|
|
|
2022-09-29 23:12:56 +00:00
|
|
|
@media ( min-width: @width-breakpoint-desktop ) {
|
|
|
|
.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;
|
|
|
|
border-right: 0;
|
|
|
|
border-bottom: 1px solid var( --border-color-base );
|
|
|
|
margin: var( --space-xxs ) 0;
|
|
|
|
}
|
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 */
|
|
|
|
@media ( max-width: @width-breakpoint-tablet ) {
|
|
|
|
.citizen-header {
|
2023-07-07 21:02:27 +00:00
|
|
|
transition: var( --transition-menu );
|
|
|
|
transition-property: transform;
|
2023-07-14 22:18:18 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Add overlay to menus as affordnance
|
|
|
|
* TODO: We should use JS to add the overlay instead of abusing CSS
|
2023-07-16 06:49:33 +00:00
|
|
|
* TODO: This does not work for TOC and Pref menu
|
2023-07-14 22:18:18 +00:00
|
|
|
*/
|
2023-07-16 06:49:33 +00:00
|
|
|
.citizen-header__button {
|
2023-07-14 22:18:18 +00:00
|
|
|
contain: initial;
|
|
|
|
|
2023-07-19 09:57:55 +00:00
|
|
|
~ .citizen-header__button {
|
|
|
|
&::before {
|
|
|
|
position: fixed;
|
|
|
|
z-index: 1;
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
width: auto;
|
|
|
|
height: auto;
|
|
|
|
background-color: var( --background-color-overlay );
|
|
|
|
content: '';
|
2023-07-19 09:58:48 +00:00
|
|
|
opacity: 0;
|
|
|
|
pointer-events: none;
|
|
|
|
transition: var( --transition-menu );
|
|
|
|
transition-property: opacity;
|
|
|
|
visibility: hidden;
|
2023-07-19 09:57:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-14 22:18:18 +00:00
|
|
|
&[ aria-expanded='true' ] {
|
2023-07-16 06:49:33 +00:00
|
|
|
~ .citizen-header__button {
|
|
|
|
&::before {
|
2023-07-19 09:57:55 +00:00
|
|
|
opacity: 1;
|
|
|
|
pointer-events: auto;
|
2023-07-19 09:58:48 +00:00
|
|
|
visibility: visible;
|
2023-07-16 06:49:33 +00:00
|
|
|
}
|
2023-07-14 22:18:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-11-10 01:02:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.citizen-scroll--down .citizen-header {
|
|
|
|
transform: translateY( 100% );
|
|
|
|
}
|
|
|
|
}
|