inspec/www/source/stylesheets/_nav.scss
Hannah Maddy bd4a73cfb9 WIP New Inspec.io
Base SCSS, JS, fonts, images, HTML ported over to old inspec.io
tempting engine.
—To do:
Media queries, Header, footer, docs, tutorials
2017-01-20 10:22:51 +01:00

183 lines
2.8 KiB
SCSS

//Not Styled Yet
$side-nav-width: 200px;
$top-nav-height: 100px;
$side-nav-padding-large: 10px;
$side-nav-padding-small: 30px;
$nav-breakpoint: 730px;
@mixin nav-large {
@media (min-width: #{$nav-breakpoint}) {
@content;
}
}
@mixin nav-small {
@media (max-width: $nav-breakpoint - 1px) {
@content;
}
}
#main-nav {
position: fixed;
top: 0;
z-index: 1000;
width: 100%;
background: $color_white;
transition: top 0.3s ease;
@include nav-large {
position: fixed;
z-index: 100;
width: $side-nav-width;
}
&.is-fixed-bottom {
@include nav-large {
top: auto !important;
position: absolute;
}
@media (min-width: 640px) and (max-width: 879px) {
bottom: 156px;
}
@media (min-width: 880px) {
bottom: 141px;
}
}
}
.main-nav--toggle {
display: none;
transition: all 0.3s ease;
path {
fill: $color_gray;
}
@include nav-small {
display: block;
position: absolute;
top: 20px;
right: $side-nav-padding-small;
width: 20px;
height: 20px;
cursor: pointer;
}
&.is-active {
transform: rotate(-90deg);
path {
fill: $color_link;
}
}
}
.main-nav--link-ctas {
padding: 9px 0 9px $side-nav-padding-small;
border-bottom: 1px solid lighten($color_gray, 40%);
& > .button {
margin-bottom: 0;
}
@include nav-large {
display: none;
}
}
.main-nav--logo {
display: block;
@include nav-small {
max-width: 130px;
margin: 15px 0 15px $side-nav-padding-small;
}
@include nav-large {
padding: 0 $side-nav-padding-large;
margin: 30px 0;
}
}
.main-nav--links {
border-top: 1px solid lighten($color_gray, 40%);
margin-bottom: 0;
@extend .no-bullet;
@include nav-small {
display: none;
}
.sidebar-layout-docs & {
max-height: calc(100vh - 64px);
overflow-y: scroll;
@include nav-large {
max-height: calc(100vh - 107px);
}
}
}
.main-nav--link {
position: relative;
padding: 9px 0;
border-bottom: 1px solid lighten($color_gray, 40%);
text-transform: uppercase;
font-size: 14px;
& > a {
color: $color_gray;
&:hover,
&:focus,
&:active {
color: darken($color_gray, 15%);
}
}
}
.main-nav--link-icon {
position: absolute;
top: 13px;
left: $side-nav-padding-small;
font-size: 0.9em;
@include nav-large {
left: $side-nav-padding-large;
}
}
.main-nav--link-text {
margin-left: 55px;
@include nav-large {
margin-left: 34px;
}
}
#main-nav-ctas {
transition: top 0.3s ease;
background: $color_white;
@include nav-small {
display: none;
}
@include nav-large {
position: fixed;
z-index: 90;
top: 0;
width: 100%;
max-width: 1200px;
padding: 30px 10px 30px 0;
text-align: right;
& > .button {
margin-bottom: 0;
}
}
}