Skip to content

Commit

Permalink
Add variables for nav and header styles
Browse files Browse the repository at this point in the history
  • Loading branch information
ashawley committed Feb 14, 2019
1 parent 0f30943 commit b15bd0f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
16 changes: 8 additions & 8 deletions _sass/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
}

.site-header a {
color: #333;
color: $header-color;
font-size: $h3;
font-weight: 300;
font-weight: $header-font-weight;
background-image: none;
}

Expand All @@ -15,11 +15,11 @@
}

.site-nav {
margin-top: $space-2;
padding-top: $nav-padding;
}

.site-header nav a {
color: #666;
color: $nav-color;
}

.site-header nav a:hover,
Expand All @@ -28,17 +28,17 @@
.site-header nav a.nav-active:hover,
.site-header nav a.nav-active:focus,
.site-header nav a.nav-active:active {
color: #444;
color: $nav-link-color;
opacity: 1;
border-bottom: 2px solid #444;
border-bottom: $nav-link-border-bottom;
}

.site-header nav a.nav-active {
border-bottom: 1px solid $light-gray;
border-bottom: $nav-active-border-bottom;
}

.site-nav a + a {
margin-left: 1em;
padding-left: $nav-link-padding-x;
}

.site-header a:hover,
Expand Down
14 changes: 14 additions & 0 deletions _sass/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,20 @@ $hljs-addition: $light-green;
$hljs-change: $dark-blue;
$hljs-chunk: $light-gray;

// Header
$header-border-top: thin solid #f3f3f3;
$header-color: $dark-gray;
$header-bg-color: #fafafa;
$header-font-weight: 300;

// Nav
$nav-color: $mid-gray;
$nav-link-color: #444;
$nav-padding: $space-2;
$nav-link-padding-x: $space-2;
$nav-link-border-bottom: 2px solid #444;
$nav-active-border-bottom: 1px solid $light-gray;

// Footer
$footer-border-top: thin solid #f3f3f3;
$footer-padding: $space-3;
Expand Down

3 comments on commit b15bd0f

@ostrodmit
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are mistakes in lines 18 and 41 of _sass/_header.scss
Should be margin-top and margin-left. As a result of the second mistake, empty space is underlined when the link is active.

@ashawley
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for reporting this! 🏅

I'll try to create a fix...

@ostrodmit
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing the issue quickly 👍

Please sign in to comment.