Skip to content

Instantly share code, notes, and snippets.

@mlovic
Created February 5, 2015 17:42
Show Gist options
  • Save mlovic/9cee9bf64c32205ec2d9 to your computer and use it in GitHub Desktop.
Save mlovic/9cee9bf64c32205ec2d9 to your computer and use it in GitHub Desktop.
Sample sass code for a header. Uses Bourbon and Neat libraries.
@import "../bourbon/bourbon";
@import "../neat/neat";
@import url(http://fonts.googleapis.com/css?family=Lato:100,300,400,700,900);
body {
/*font-family: $lucida-grande;*/
font-family: 'Lato', sans-serif;
}
$header-height: 65px;
$nav-link-color: #555;
.header-wrapper {
@include outer-container(100%);
// Underline
border-width: 0 0 2px 0;
@include border-image(
linear-gradient(
90deg,
white,
#bbb 12%,
#bbb 20%,
#eee 40%,
#eee 45%,
#bbb 68%,
#bbb 80%,
white 100%
) 0 0 1 0 stretch
);
// TODO Write function to take into account 80% vs 100% containers
}
header.navigation {
/*@include outer-container(80%);*/
max-width: 80%;
margin: 0 auto;
a {
text-decoration: none;
color: $nav-link-color;
}
min-height: $header-height;
width: 100%;
position: relative;
.title-name {
font-size: 2em;
font-weight: 700;
color: black;
position: absolute;
left: 0;
bottom: 0;
line-height: 40px;
padding-bottom: 5px;
letter-spacing: 0.05em;
}
ul.nav-menu {
list-style: none;
/*clear: both;*/
/*display: none;*/
position: absolute;
overflow: visible;
width: 70%;
margin: 0;
bottom: 0;
right: 0;
padding-right: 1.5em;
}
li.nav-link {
display: block;
width: 7em;
float: right;
/*padding: 0 1.5em;*/
line-height: 40px;
text-align: center;
a {
font-size: 1.2em;
letter-spacing: 0.1em;
@include transition(all 0.25s ease-in-out);
&:hover {
color: darken($nav-link-color, 40%);
letter-spacing: 0.15em;
/*li.nav-link &{*/
/*left-padding: 1.35em; */
/*}*/
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment