Improve side navigation spacing in relation to masthead
This commit is contained in:
parent
676b9cc0e3
commit
e707057fa8
6 changed files with 33 additions and 18 deletions
|
@ -3,6 +3,7 @@
|
||||||
========================================================================== */
|
========================================================================== */
|
||||||
|
|
||||||
.archive {
|
.archive {
|
||||||
|
margin-top: 1em;
|
||||||
margin-bottom: 2em;
|
margin-bottom: 2em;
|
||||||
|
|
||||||
@include breakpoint($large) {
|
@include breakpoint($large) {
|
||||||
|
|
|
@ -18,8 +18,10 @@
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
|
display: -ms-flexbox;
|
||||||
display: flex;
|
display: flex;
|
||||||
-webkit-box-pack: justify;
|
-webkit-box-pack: justify;
|
||||||
|
-ms-flex-pack: justify;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
font-family: $sans-serif-narrow;
|
font-family: $sans-serif-narrow;
|
||||||
|
|
||||||
|
@ -39,11 +41,10 @@
|
||||||
|
|
||||||
.site-title {
|
.site-title {
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
|
display: -ms-flexbox;
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 0.5rem 0;
|
-ms-flex-item-align: center;
|
||||||
align-self: stretch;
|
align-self: center;
|
||||||
-webkit-box-align: center;
|
|
||||||
align-items: center;
|
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
z-index: 20;
|
z-index: 20;
|
||||||
}
|
}
|
||||||
|
|
|
@ -176,15 +176,17 @@
|
||||||
.greedy-nav {
|
.greedy-nav {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
|
display: -ms-flexbox;
|
||||||
display: flex;
|
display: flex;
|
||||||
-webkit-box-align: center;
|
-webkit-box-align: center;
|
||||||
|
-ms-flex-align: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
min-height: $nav-height;
|
||||||
background: $background-color;
|
background: $background-color;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0 1rem;
|
margin: 0 1rem;
|
||||||
padding: 0.5rem 0;
|
|
||||||
color: $masthead-link-color;
|
color: $masthead-link-color;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|
||||||
|
@ -198,7 +200,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&__toggle {
|
&__toggle {
|
||||||
padding: 0 0.5rem;
|
-ms-flex-item-align: stretch;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
border: 0;
|
border: 0;
|
||||||
outline: none;
|
outline: none;
|
||||||
|
@ -209,15 +211,19 @@
|
||||||
|
|
||||||
.visible-links {
|
.visible-links {
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
|
display: -ms-flexbox;
|
||||||
display: flex;
|
display: flex;
|
||||||
-webkit-box-pack: end;
|
-webkit-box-pack: end;
|
||||||
|
-ms-flex-pack: end;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
-webkit-box-flex: 1;
|
-webkit-box-flex: 1;
|
||||||
|
-ms-flex: 1;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
li {
|
li {
|
||||||
-webkit-box-flex: 0;
|
-webkit-box-flex: 0;
|
||||||
|
-ms-flex: none;
|
||||||
flex: none;
|
flex: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -235,13 +241,13 @@
|
||||||
-webkit-transition: $global-transition;
|
-webkit-transition: $global-transition;
|
||||||
transition: $global-transition;
|
transition: $global-transition;
|
||||||
-webkit-transform: scaleX(0) translate3d(0, 0, 0);
|
-webkit-transform: scaleX(0) translate3d(0, 0, 0);
|
||||||
transform: scaleX(0) translate3d(0, 0, 0); /* hide*/
|
transform: scaleX(0) translate3d(0, 0, 0); // hide
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover:before {
|
&:hover:before {
|
||||||
-webkit-transform: scaleX(1);
|
-webkit-transform: scaleX(1);
|
||||||
-ms-transform: scaleX(1);
|
-ms-transform: scaleX(1);
|
||||||
transform: scaleX(1); /* reveal*/
|
transform: scaleX(1); // reveal
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -255,6 +261,8 @@
|
||||||
border: 1px solid $border-color;
|
border: 1px solid $border-color;
|
||||||
border-radius: $border-radius;
|
border-radius: $border-radius;
|
||||||
background: $background-color;
|
background: $background-color;
|
||||||
|
-webkit-box-shadow: 0 2px 4px 0 rgba(#000, 0.16),
|
||||||
|
0 2px 10px 0 rgba(#000, 0.12);
|
||||||
box-shadow: 0 2px 4px 0 rgba(#000, 0.16), 0 2px 10px 0 rgba(#000, 0.12);
|
box-shadow: 0 2px 4px 0 rgba(#000, 0.16), 0 2px 10px 0 rgba(#000, 0.12);
|
||||||
|
|
||||||
&.hidden {
|
&.hidden {
|
||||||
|
@ -331,7 +339,7 @@
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include breakpoint(max-width ($large - 1px)) {
|
@include breakpoint(max-width($large - 1px)) {
|
||||||
label {
|
label {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -437,7 +445,7 @@
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include breakpoint(max-width ($large - 1px)) {
|
@include breakpoint(max-width($large - 1px)) {
|
||||||
position: relative;
|
position: relative;
|
||||||
max-height: 0;
|
max-height: 0;
|
||||||
opacity: 0%;
|
opacity: 0%;
|
||||||
|
@ -451,7 +459,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@include breakpoint(max-width ($large - 1px)) {
|
@include breakpoint(max-width($large - 1px)) {
|
||||||
.nav__list input:checked ~ .nav__items {
|
.nav__list input:checked ~ .nav__items {
|
||||||
-webkit-transition: 0.5s ease-in-out;
|
-webkit-transition: 0.5s ease-in-out;
|
||||||
transition: 0.5s ease-in-out;
|
transition: 0.5s ease-in-out;
|
||||||
|
@ -496,6 +504,7 @@
|
||||||
background-color: $background-color;
|
background-color: $background-color;
|
||||||
border: 1px solid $border-color;
|
border: 1px solid $border-color;
|
||||||
border-radius: $border-radius;
|
border-radius: $border-radius;
|
||||||
|
-webkit-box-shadow: $box-shadow;
|
||||||
box-shadow: $box-shadow;
|
box-shadow: $box-shadow;
|
||||||
|
|
||||||
.nav__title {
|
.nav__title {
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
#main {
|
#main {
|
||||||
@include clearfix;
|
@include clearfix;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-top: 2em;
|
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
padding-left: 1em;
|
padding-left: 1em;
|
||||||
padding-right: 1em;
|
padding-right: 1em;
|
||||||
|
@ -34,6 +33,7 @@
|
||||||
|
|
||||||
.page__inner-wrap {
|
.page__inner-wrap {
|
||||||
float: left;
|
float: left;
|
||||||
|
margin-top: 1em;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
|
|
||||||
.sidebar {
|
.sidebar {
|
||||||
@include clearfix();
|
@include clearfix();
|
||||||
margin-bottom: 1em;
|
|
||||||
|
|
||||||
@include breakpoint(max-width $large) {
|
@include breakpoint(max-width $large) {
|
||||||
/* fix z-index order of follow links */
|
/* fix z-index order of follow links */
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -31,10 +29,10 @@
|
||||||
|
|
||||||
&.sticky {
|
&.sticky {
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
/* calculate height of nav list */
|
/* calculate height of nav list
|
||||||
height: calc(
|
viewport height - nav height - masthead x-padding
|
||||||
100vh - 90px - 2em
|
*/
|
||||||
); // viewport height - approx. masthead height - main content top margin
|
height: calc(100vh - #{$nav-height} - 2em);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,6 +40,11 @@
|
||||||
width: calc(#{$right-sidebar-width} - 1em);
|
width: calc(#{$right-sidebar-width} - 1em);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
> * {
|
||||||
|
margin-top: 1em;
|
||||||
|
margin-bottom: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
h2,
|
h2,
|
||||||
h3,
|
h3,
|
||||||
h4,
|
h4,
|
||||||
|
|
|
@ -148,6 +148,7 @@ $right-sidebar-width-wide: 400px !default;
|
||||||
|
|
||||||
$border-radius: 4px !default;
|
$border-radius: 4px !default;
|
||||||
$box-shadow: 0 1px 1px rgba(0, 0, 0, 0.125) !default;
|
$box-shadow: 0 1px 1px rgba(0, 0, 0, 0.125) !default;
|
||||||
|
$nav-height: 40px !default;
|
||||||
$navicon-width: 1.5rem !default;
|
$navicon-width: 1.5rem !default;
|
||||||
$navicon-height: 0.25rem !default;
|
$navicon-height: 0.25rem !default;
|
||||||
$global-transition: all 0.2s ease-in-out !default;
|
$global-transition: all 0.2s ease-in-out !default;
|
||||||
|
|
Loading…
Add table
Reference in a new issue