hubl/src/styles/base/header.scss

353 lines
6.8 KiB
SCSS
Raw Normal View History

#header {
max-height: 50px;
height: 50px;
display: flex;
align-items: center;
2020-05-11 15:15:59 +00:00
background-color: var(--color-header-background);
color: var(--color-black);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.09);
flex-shrink: 0;
position: fixed;
z-index: 999;
width: -webkit-fill-available;
width: -moz-available;
2020-06-03 12:16:29 +00:00
@include breakpoint(lg) {
max-height: 83px;
height: 83px;
position: relative;
2020-06-03 12:16:29 +00:00
}
2020-05-13 07:25:33 +00:00
&.is-spaced {
2020-06-03 12:16:29 +00:00
padding: 0 0.8rem;
@include breakpoint(lg) {
padding: 0 2.5rem;
}
}
2020-05-19 07:07:18 +00:00
2020-06-03 12:16:29 +00:00
>*:not(:first-child) {
margin-left: 2rem;
@include breakpoint(lg) {
margin-left: 0;
2020-05-19 07:07:18 +00:00
}
2019-06-26 10:42:34 +00:00
}
2020-01-19 12:57:34 +00:00
.logo {
2020-05-13 07:25:33 +00:00
flex: 1 0 0;
align-items: stretch;
2020-01-19 12:57:34 +00:00
}
2020-06-03 12:16:29 +00:00
/* To remove the place taken by this element */
2020-06-18 18:02:54 +00:00
solid-widget[name='hubl-user-avatar'] {
2020-06-03 12:16:29 +00:00
display: contents;
}
}
/* General styling for both notification and user's panel */
details {
2020-06-03 12:16:29 +00:00
margin-right: 0;
position: relative;
2020-01-19 12:57:34 +00:00
2020-06-03 12:16:29 +00:00
@include breakpoint(lg) {
margin-right: 2.5rem;
}
summary {
&::-moz-list-bullet {
list-style-type: none; /* To remove the disclosure triangle on Firefox v.<69 */
2020-01-19 12:57:34 +00:00
}
&::-webkit-details-marker {
display: none;
}
}
}
/* End */
2020-06-25 21:20:17 +00:00
solid-notifications {
color: var(--color-bell);
@include breakpoint(sm) {
padding: 0;
}
2020-06-26 07:19:21 +00:00
.solid-notifications__container {
position: relative;
2020-06-26 07:19:21 +00:00
.solid-notifications__button {
@include icon('bell');
font-size: 2.5rem;
@include breakpoint(lg) {
font-size: 3rem;
}
2019-06-26 10:42:34 +00:00
&::before {
margin-left: 0;
}
img {
2019-06-26 10:42:34 +00:00
display: none;
}
2019-06-26 10:42:34 +00:00
2020-06-26 07:19:21 +00:00
.solid-notifications__counter {
left: 2rem;
2019-06-26 10:42:34 +00:00
position: absolute;
top: 1px;
@include breakpoint(lg) {
left: 2.1rem;
top: -3px;
}
2020-06-27 15:23:08 +00:00
span {
color: var(--color-notification-counter-number);
}
2019-06-26 10:42:34 +00:00
}
}
2019-06-26 10:42:34 +00:00
2020-06-26 07:19:21 +00:00
.solid-notifications__list {
border: none;
border-radius: 0;
box-shadow: 0 0 7px 0 rgba(92, 97, 104, 0.24);
2020-06-11 13:20:20 +00:00
position: fixed;
left: 0;
top: 4.5rem;
width: 100vw;
2020-06-26 13:09:41 +00:00
/* Custom scrollbar */
overflow: auto;
-webkit-overflow-scrolling: touch;
-ms-overflow-style: none;
scrollbar-width: thin;
scrollbar-color: var(--color-notification-scrollbar-track) var(--color-notification-scrollbar-background);
&::-webkit-scrollbar-track {
background: var(--color-notification-scrollbar-background);
}
&::-webkit-scrollbar-thumb {
background-color: var(--color-notification-scrollbar-track);
border-radius: 6px;
}
&::-webkit-scrollbar {
2020-06-26 13:09:41 +00:00
width: 6px;
}
2020-06-26 13:09:41 +00:00
/* End of custom scrollbar */
@include breakpoint(md) {
border: 0;
border-radius: 0;
}
2020-06-11 13:20:20 +00:00
@include breakpoint(lg) {
position: absolute;
left: auto;
right: 0;
top: 5.7rem;
2020-06-26 09:17:44 +00:00
width: 347px;
}
.solid-notifications__item {
border-bottom: 1px solid var(--color-notification-item-border);
2020-06-26 09:17:44 +00:00
.solid-notification {
padding: 1.2rem 0 1.5rem;
2020-06-26 09:17:44 +00:00
.solid-notification__avatar {
height: 35px;
width: 35px;
2020-06-26 09:17:44 +00:00
margin-left: 1.6rem;
margin-right: 1.4rem;
}
.solid-notification__content {
.solid-notification__summary {
color: var(--color-notification-summary);
font-size: 1.2rem;
line-height: 1.7rem;
margin: 1.1rem 0 0;
2020-06-29 09:15:31 +00:00
@include breakpoint(320px, 388px) {
max-width: 226px;
}
@include breakpoint(lg) {
max-width: 256px;
}
2020-06-26 09:17:44 +00:00
}
.solid-notification__date {
display: none;
}
}
2020-06-29 09:15:31 +00:00
.solid-notification__read {
display: none;
}
2020-06-26 09:17:44 +00:00
}
2020-06-11 13:20:20 +00:00
}
2019-06-26 10:42:34 +00:00
}
}
}
#user-controls {
padding: 0;
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
summary {
cursor: pointer;
display: block; /* To remove the disclosure triangle on Firefox v.>=69 */
2020-06-03 12:16:29 +00:00
@include breakpoint(lg) {
padding: 18px;
}
&:focus {
background-color: transparent;
color: var(--color-user-panel-header-text-open);
outline: none;
@include breakpoint(lg) {
background-color: var(--color-user-panel-header-background-open);
}
}
}
#user-controls__profile {
div {
display: flex;
flex-direction: row-reverse;
> * {
vertical-align: middle;
}
hubl-user-avatar {
height: 3.3rem;
margin-right: 0;
width: 3.3rem;
@include breakpoint(lg) {
height: 4.8rem;
margin-right: 2rem;
width: 4.8rem;
}
}
2020-06-18 18:02:54 +00:00
solid-display-value[name='first_name'] {
@include icon('arrow-down');
align-items: center;
display: none;
flex-direction: row-reverse;
font-size: 1.8rem;
font-weight: 600;
&::before {
margin-left: 1.5rem;
2019-06-26 10:42:34 +00:00
}
2020-01-19 09:48:22 +00:00
@include breakpoint(lg) {
display: flex;
}
}
2018-12-16 00:28:51 +00:00
}
}
#user-controls__panel {
height: 0;
position: absolute;
right: 0;
z-index: 1;
/* Quick fix for mobile version */
width: 215px;
top: 42px;
@include breakpoint (lg) {
width: 100%;
top: 83px;
}
> nav {
background-color: var(--color-user-panel-list-background);
box-shadow: 0 7px 8px 0 rgba(0, 0, 0, 0.16);
position: absolute;
right: 0;
top: 0;
2019-06-26 10:42:34 +00:00
width: 100%;
ul {
list-style: none;
margin: 0;
padding: 0;
li {
2020-06-18 18:02:54 +00:00
solid-link {
color: var(--color-grey-4);
display: block;
border-bottom: 1px solid var(--color-user-panel-list-border);
margin-right: 0;
padding: 1.6rem 1.3rem;
&:hover {
color: var(--color-user-panel-list-text-hover);
2019-06-26 10:42:34 +00:00
}
}
}
}
button {
color: var(--color-grey-4);
padding: 1.6rem 1.3rem;
text-align: left;
width: 100%;
&:hover {
color: var(--color-user-panel-list-text-hover);
2019-06-26 10:42:34 +00:00
}
}
2018-12-16 00:28:51 +00:00
}
}
&[open] {
background-color: var(--color-user-panel-header-background);
color: var(--color-user-panel-header-text);
#user-controls__profile {
div {
2020-06-18 18:02:54 +00:00
solid-display-value[name='first_name'] {
@include icon('close');
&::before {
margin-left: 1.5rem;
}
}
}
}
}
}
2020-01-19 09:48:22 +00:00
.mobile-menu-icon {
display: block;
padding-left: 0;
font-size: 24px;
2020-01-19 09:48:22 +00:00
@include breakpoint(lg) {
display: none;
2020-01-19 09:48:22 +00:00
}
}