public/styles/components/_header.scss (248 lines of code) (raw):
$header-height: 90px;
$infobar-color: #DDEDF7;
body {
margin-top: $header-height;
}
.fixed-header {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 2;
}
.show-reader-mode {
display: none !important;
}
.is-reader {
& .show-reader-mode {
display: inline-block !important;
}
& .hide-reader-mode {
display: none !important;
}
}
.desktop-enabled {
& .hide-desktop-enabled {
display: none !important;
}
}
%top-toolbar__status {
box-sizing: border-box;
margin: 13px;
padding: 3px 10px;
border-radius: 25px;
text-transform: uppercase;
font-weight: 700;
}
.tool-bar {
width: 100%;
}
.top-toolbar {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
min-height: 50px;
max-height: 50px;
background-color: $c-bluegrey;
border-bottom: 1px solid $c-grey-400;
white-space: normal;
overflow-y: hidden;
z-index: 2;
a {
color: inherit;
}
}
.top-toolbar__logo {
width: 50px;
background: url(../images/eye-white-32.svg) center center no-repeat #005689;
}
.top-toolbar__logo-link {
display: block;
height: 50px;
width: 50px;
}
.top-toolbar__view-toolbar {
// Flexbox prefixes - TODO: Autoprefixer
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
// Flexbox prefixes - TODO: Autoprefixer
-webkit-box-flex: 1;
-webkit-flex-grow: 1;
-ms-flex-positive: 1;
flex-grow: 1;
flex-shrink: 1;
}
.top-toolbar {
&__button,
&__button--mobilecheck,
&__button--right,
&__button--desktop,
&__button--blockads {
@extend %fs-data-3;
display: inline-block;
position: relative;
text-decoration: none;
color: inherit;
padding-top: 16px;
padding-bottom: 16px;
padding-left: 15px;
padding-right: 15px;
border-top: 3px solid $c-bluegrey;
border-right: 1px solid $c-grey-400;
list-style: none;
cursor: pointer;
&:hover {
border-top: 3px solid #d0d0d0;
background-color: #d0d0d0;
}
&.is-selected {
border-top: 3px solid #00a8ed;
}
&.is-hidden {
display: none;
}
&.is-hidden.is-always-visible {
display: inline-block;
}
}
&__button--mobilecheck.is-selected {
border-top: 3px solid $c-bluegrey;
}
&__button--desktop {
display: none;
.desktop-enabled & {
display: inline-block;
}
}
&__button--right {
float: right;
border-left: 1px solid $c-grey-400;
border-right-width: 0;
}
&__container {
display: inline-block;
border-right: 1px solid $c-grey-400;
list-style: none;
.top-toolbar__button {
border-right-width: 0;
}
}
&__container--right {
display: inline-block;
float: right;
}
&__label {
@extend %fs-data-3;
display: inline-block;
padding-left: 15px;
padding-right: 10px;
}
&__status--preview {
@extend %top-toolbar__status;
background-color: $c-yellow;
}
&__status--live {
@extend %top-toolbar__status;
background-color: $c-green;
color: $c-white;
}
}
.top-toolbar__icon--desktop {
@extend %icon__desktop;
height: 17px;
margin-right: 7px;
.is-selected:hover & {
@extend %icon__refresh-desktop;
position: relative;
top: -1px;
height: 17px;
}
}
.top-toolbar__icon--printer {
@extend %icon__printer;
height: 17px;
margin-right: 7px;
}
.top-toolbar__icon--copycheck {
@extend %icon__copycheck;
height: 17px;
margin-right: 7px;
}
.top-toolbar__icon--socialshare {
@extend %icon__socialshare;
height: 17px;
margin-right: 7px;
}
.top-toolbar__icon--guardian {
@extend %icon__guardian;
height: 17px;
margin-right: 7px;
position: relative;
top: -1px;
}
.top-toolbar__icon--mobile-portrait {
@extend %icon__mobile-portrait;
.is-selected & {
@extend %icon__mobile-portrait--selected;
}
.is-selected:hover & {
@extend %icon__refresh;
height: 16px;
width: 16px;
margin: 2px;
}
}
.top-toolbar__icon--mobile-landscape {
@extend %icon__mobile-landscape;
.is-selected & {
@extend %icon__mobile-landscape--selected;
}
.is-selected:hover & {
@extend %icon__refresh;
height: 16px;
width: 16px;
margin: 2px;
}
}
.top-toolbar__icon--checkbox {
@extend %icon__checkbox;
height: 18px;
position: relative;
top: -2px;
margin-right: 7px;
.desktop-enabled .top-toolbar__button--mobilecheck & {
@extend %icon__checkbox--checked;
height: 18px;
}
.ads-blocked .top-toolbar__button--blockads & {
@extend %icon__checkbox--checked;
height: 18px;
}
}
.info-bar,
.error-bar--active {
border-bottom: 1px solid $c-grey-100;
background-color: $infobar-color;
text-align: center;
padding: 10px;
width: 100%;
}
.error-bar {
display: none;
&--active {
color: black;
display: block;
background-color: $c-red;
}
}
.top-toolbar__button--appApple {
@extend %icon__apple;
height: 17px;
}
.top-toolbar__button--appAndroid {
@extend %icon__android;
margin-right: 4px;
margin-left: -7px;
height: 17px;
}