From 4d119665899bd9a7816da0929f41bdd0958aba97 Mon Sep 17 00:00:00 2001 From: Jeremy Thomas Date: Sun, 8 May 2016 11:01:55 +0100 Subject: [PATCH] Fix nav, Remove navbar and header references, Add visited links --- CHANGELOG.md | 2 ++ sass/components/nav.sass | 66 +++++++++++++++++------------------ sass/elements/content.sass | 3 ++ sass/elements/table.sass | 4 ++- sass/layout/footer.sass | 14 ++++---- sass/layout/header.sass | 2 ++ sass/utilities/variables.sass | 2 -- 7 files changed, 51 insertions(+), 42 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 59677d71..ecd97d81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ * Added: `.tabs ul` left center right * Changed: `.navbar` renamed to `.level` * Changed: `.header` renamed to `.nav` +* Deprecated: `.header` +* Deprecated: `.navbar` * Fixed: `.hero` layout ## 0.0.25 diff --git a/sass/components/nav.sass b/sass/components/nav.sass index 5819374d..0b32f58b 100644 --- a/sass/components/nav.sass +++ b/sass/components/nav.sass @@ -1,19 +1,4 @@ -.nav - align-items: stretch - background: $white - display: flex - min-height: $nav-height - position: relative - text-align: center - z-index: 2 - & > .container - align-items: stretch - display: flex - min-height: $nav-height - width: 100% - // Modifiers - &.has-shadow - box-shadow: 0 2px 3px rgba($black, 0.1) +// Components .nav-toggle @extend .hamburger @@ -21,8 +6,6 @@ +tablet display: none -// Elements - .nav-item align-items: center display: flex @@ -64,21 +47,6 @@ a.nav-item border-top: 3px solid transparent color: $link -.nav-tab - align-items: center - border: 1px solid transparent - color: $text - display: block - height: $nav-height - line-height: 24px - padding: 13px 15px - &:hover - border-bottom: 1px solid $link - // Modifiers - &.is-active - border-bottom: 3px solid $link - color: $link - // Containers .nav-menu @@ -118,3 +86,35 @@ a.nav-item display: flex flex: 1 justify-content: flex-end + +// Main container + +.nav + align-items: stretch + background: $white + display: flex + min-height: $nav-height + position: relative + text-align: center + z-index: 2 + & > .container + align-items: stretch + display: flex + min-height: $nav-height + width: 100% + & > .nav-left + & > .nav-item:first-child:not(.is-tab) + padding-left: 0 + & > .nav-right + & > .nav-item:last-child:not(.is-tab) + padding-right: 0 + .container > & + & > .nav-left + & > .nav-item:first-child:not(.is-tab) + padding-left: 0 + & > .nav-right + & > .nav-item:last-child:not(.is-tab) + padding-right: 0 + // Modifiers + &.has-shadow + box-shadow: 0 2px 3px rgba($black, 0.1) diff --git a/sass/elements/content.sass b/sass/elements/content.sass index 5c845d93..43496c85 100644 --- a/sass/elements/content.sass +++ b/sass/elements/content.sass @@ -2,8 +2,11 @@ @extend .block // Inline a + border-bottom: 1px solid $border &:visited color: $link-visited + &:hover + border-bottom-color: $link li + li margin-top: 0.25em // Block diff --git a/sass/elements/table.sass b/sass/elements/table.sass index 192dfb56..60fd54c5 100644 --- a/sass/elements/table.sass +++ b/sass/elements/table.sass @@ -83,7 +83,9 @@ &.is-striped tbody tr + &:hover + background: darken($background, 5%) &:nth-child(2n) background: $background &:hover - background: $border + background: darken($background, 5%) diff --git a/sass/layout/footer.sass b/sass/layout/footer.sass index dfc51905..255ebd44 100644 --- a/sass/layout/footer.sass +++ b/sass/layout/footer.sass @@ -2,10 +2,12 @@ background: $background padding: 40px 20px 80px a - color: $text - &:hover - color: $text-strong - &:not(.icon) - border-bottom: 1px solid $border + &, + &:visited + color: $text &:hover - border-bottom-color: $link + color: $text-strong + &:not(.icon) + border-bottom: 1px solid $border + &:hover + border-bottom-color: $link diff --git a/sass/layout/header.sass b/sass/layout/header.sass index f45dfebd..07b21d4d 100644 --- a/sass/layout/header.sass +++ b/sass/layout/header.sass @@ -1,3 +1,5 @@ +$header-height: 50px !default + .header +clearfix background: $white diff --git a/sass/utilities/variables.sass b/sass/utilities/variables.sass index 433c31f8..70ccf8d2 100644 --- a/sass/utilities/variables.sass +++ b/sass/utilities/variables.sass @@ -47,8 +47,6 @@ $widescreen: 1180px !default $column-gap: 20px !default -$header-height: 50px !default - $nav-height: 50px !default // Miscellaneous