Skip to content

Instantly share code, notes, and snippets.

@timgauthier
Created April 15, 2014 22:17
Show Gist options
  • Save timgauthier/10782839 to your computer and use it in GitHub Desktop.
Save timgauthier/10782839 to your computer and use it in GitHub Desktop.
This is a mixing that lets me have a different colour for my navigation and masthead/header on each page of my personal portfolio
@mixin navigation-menu-mixin (
$color: red,
$background: red,
$active: 35,
$hover: 55,
$hover-background-tint: 15,
$anchor: 38,
$active-background-tint: 20
) {
@extend .navigation--menu;
.button {
color: tint($background, $hover-background-tint - 10);
@include transition(color .25s $ease-out-quad);
&:hover, &:focus, &:visited:hover {
color: tint($background, $hover-background-tint + 20);
};
}
li {
a {
color: shade($color, $anchor);
background-color: shade($color, 4);
&:hover, &:focus {
color: shade($color, $hover);
background-color: tint($background, $hover-background-tint);
}
}
}
.active {
@extend %active;
color: shade($color, $active);
background: tint($color, $active-background-tint);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment