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 );
|
|
|
|
place-items: center;
|
|
|
|
|
|
|
|
// Used in checkbox hack
|
|
|
|
&Checkbox {
|
|
|
|
position: absolute;
|
|
|
|
display: block;
|
|
|
|
width: inherit;
|
|
|
|
height: inherit;
|
|
|
|
}
|
|
|
|
|
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-05-10 15:56:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&Icon,
|
2022-11-03 22:30:41 +00:00
|
|
|
.citizen-ui-icon:before {
|
2022-05-10 15:56:50 +00:00
|
|
|
opacity: var( --opacity-icon-base );
|
|
|
|
transition: @transition-transform, @transition-opacity;
|
|
|
|
}
|
|
|
|
|
2022-05-10 00:23:42 +00:00
|
|
|
&:hover {
|
|
|
|
background-color: var( --background-color-quiet--hover );
|
2022-05-10 15:56:50 +00:00
|
|
|
|
2022-11-03 22:30:41 +00:00
|
|
|
.citizen-ui-icon:before,
|
|
|
|
.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
|
|
|
|
2022-11-03 22:30:41 +00:00
|
|
|
.citizen-ui-icon:before,
|
|
|
|
.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
|
|
|
|
|
|
|
&__inner {
|
2022-05-25 20:00:45 +00:00
|
|
|
z-index: -1; // Inner element should be behind menu and search
|
2022-05-10 14:50:01 +00:00
|
|
|
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 );
|
2022-05-10 16:55:20 +00:00
|
|
|
|
|
|
|
.mw-checkbox-hack-checkbox:checked {
|
|
|
|
~ .citizen-header__button {
|
|
|
|
background-color: var( --background-color-primary--active );
|
|
|
|
}
|
|
|
|
}
|
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 );
|
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-10 15:56:50 +00:00
|
|
|
.skin-citizen-dark {
|
|
|
|
.citizen-header__button {
|
2022-11-03 22:30:41 +00:00
|
|
|
&Icon {
|
2022-05-10 15:56:50 +00:00
|
|
|
filter: invert( 1 );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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 );
|
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 {
|
|
|
|
transition: @transition-transform;
|
|
|
|
}
|
|
|
|
|
|
|
|
.citizen-scroll--down .citizen-header {
|
|
|
|
transform: translateY( 100% );
|
|
|
|
}
|
|
|
|
}
|