lbry-desktop/ui/scss/component/_header.scss
2021-12-21 16:36:16 -05:00

286 lines
5.4 KiB
SCSS

@import '../init/vars';
@import '../init/mixins';
.header {
z-index: 3; // Main content uses z-index: 1, other content uses z-index: 2, this ensures it always scrolls under the header
position: fixed;
top: 0;
width: 100%;
background-color: var(--color-header-background);
box-shadow: var(--card-box-shadow);
font-size: var(--font-body);
user-select: none;
-webkit-user-select: none;
-webkit-app-region: drag;
.skip-button {
opacity: 0;
position: absolute;
top: 0;
left: 0;
width: 0;
height: 0;
overflow: hidden;
margin-right: var(--spacing-l);
&:focus {
opacity: 1;
position: relative;
overflow: unset;
width: unset;
height: unset;
}
}
}
.header--minimal {
box-shadow: none;
background-color: var(--color-background);
border-bottom: none;
.header__navigation {
padding: var(--spacing-xs);
}
.header__navigationItem--logo {
height: 3rem;
}
}
.header__contents {
display: flex;
align-items: center;
flex: 1;
height: var(--header-height);
padding: var(--spacing-s) var(--spacing-m);
@media (max-width: $breakpoint-small) {
padding: var(--spacing-xs);
height: var(--header-height-mobile);
}
}
.header__navigation {
display: flex;
align-items: center;
justify-content: space-between;
flex: 1;
height: var(--header-height);
padding: var(--spacing-s) var(--spacing-m);
flex-wrap: nowrap;
@media (max-width: $breakpoint-small) {
padding: var(--spacing-xs);
height: var(--header-height-mobile);
}
}
.header__menu {
display: flex;
align-items: center;
}
.header__menu--left {
@extend .header__menu;
justify-content: flex-start;
}
.header__menu--right {
@extend .header__menu;
justify-content: flex-end;
width: 10rem;
min-width: 10rem;
@media (max-width: $breakpoint-small) {
width: unset;
min-width: unset;
}
}
.header__buttons {
display: flex;
}
.header__navigation-logo {
height: var(--height-button);
max-width: -webkit-fit-content;
max-width: -moz-fit-content;
max-width: fit-content;
}
.header__navigationItem {
height: var(--height-button);
display: flex;
justify-content: center;
align-items: center;
border-radius: var(--border-radius);
position: relative;
font-weight: var(--font-weight-bold);
svg {
stroke: var(--color-text);
}
&[aria-expanded='true'] {
background-color: var(--color-header-button-active);
}
@media (max-width: $breakpoint-small) {
height: var(--height-button-mobile);
}
}
.header__navigationItem--icon {
@extend .header__navigationItem;
width: var(--height-button);
background-color: var(--color-header-button);
border-radius: 1.5rem;
margin-right: var(--spacing-s);
&:hover {
background-color: var(--color-header-button-hover);
}
@media (min-width: $breakpoint-small) {
&:focus {
@include focus;
}
}
@media (max-width: $breakpoint-small) {
margin: 0;
width: var(--height-button-mobile);
}
span {
display: flex;
justify-content: center;
align-items: center;
}
}
.header__navigationItem--profilePic {
margin-right: var(--spacing-s);
background-color: var(--color-header-button);
.channel-thumbnail {
height: var(--height-button);
width: var(--height-button);
margin-right: 0;
}
&:hover {
opacity: 0.7;
}
@media (max-width: $breakpoint-small) {
margin: 0;
.channel-thumbnail {
height: var(--height-button-mobile);
width: var(--height-button-mobile);
}
}
}
.header__navigationItem--iconSkeleton {
@extend .header__navigationItem--icon;
height: var(--height-button) !important;
width: var(--height-button) !important;
@media (max-width: $breakpoint-small) {
height: var(--height-button-mobile) !important;
width: var(--height-button-mobile) !important;
}
}
.header__navigationItem--balance {
@extend .header__navigationItem;
margin: 0 var(--spacing-s);
color: var(--color-text);
&:hover {
color: var(--color-text);
}
@media (max-width: $breakpoint-small) {
margin: 0 !important;
padding: 0 !important;
width: 5rem;
}
}
.header__navigationItem--balanceLoading {
margin: 0 var(--spacing-s);
width: 4rem;
background-color: var(--color-header-button);
@media (max-width: $breakpoint-small) {
margin: 0 !important;
width: 5rem;
}
}
.header__navigationItem--logo {
@extend .header__navigationItem;
display: flex;
align-items: center;
margin-left: var(--spacing-m);
margin-right: var(--spacing-m);
color: var(--color-text);
// move to lbry theme?
.lbry-icon {
height: var(--height-button);
width: var(--height-button);
}
@media (max-width: $breakpoint-small) {
margin-right: var(--spacing-m);
.button__label {
display: none;
}
}
}
.header__authButtons {
display: flex;
align-items: center;
font-weight: var(--font-weight-bold);
& > *:not(:last-child) {
margin: 0 var(--spacing-m);
}
@media (max-width: $breakpoint-small) {
.button--link {
margin: 0;
}
.button--primary {
padding: var(--spacing-xxs);
}
}
}
.header__center {
display: flex;
justify-content: center;
width: 100%;
}
.header__authTitle {
@extend .header__center;
justify-content: center;
@media (min-width: $breakpoint-small) {
font-size: var(--font-large);
}
}
.ReactModal__Overlay {
.button--close {
margin: 0;
}
}