This repository has been archived by the owner on Nov 13, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.scss
78 lines (70 loc) · 1.67 KB
/
style.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
@charset "UTF-8";
/*
* Configurable navigation with Sass
*
* Set the $horizontal_navigation variable to true or false to get the horizontal or vertical navigation
*
* @author Gaëtan Bonnot
* @see @GaetanBt on Twitter
* @see gaetanbonnot.fr (not already using Sass on my Website :$)
*
* Some helpful advices from Gaël Poupard
* @see @ffoodd_fr on Twitter
* @see ffoodd.fr
*
* @lastmodified 2015-04-13
* @note Deleted all vendor prefixes
*/
// Variables
$horizontal_navigation: true; // horizontal navigation -> true ; vertical navigation -> false
$nav_bg: #222;
$link_color: #fff;
$warning_bg: tomato;
html { box-sizing: border-box }
*,
*:before,
*:after {
box-sizing: inherit;
}
// Styling the navigation
nav {
color: #fff;
font-family: 'Verdana', sans-serif;
font-size: .875em;
list-style-type: none;
margin: 5em;
li {
@if $horizontal_navigation == true {
display: inline-block;
} @else if $horizontal_navigation == false {
display: block;
} @else {
display: block;
// Displays the error message
&:first-child:after {
background: $warning_bg;
border: 3px solid darken($warning-bg, 10%);
border-left: 0;
content: "Error in the $horizontal_navigation variable: Must be 'true' or 'false'.";
left: 100%;
padding: 1em;
position: absolute;
top: 0;
}
}
position: relative;
width: 20%;
}
a {
background: $nav_bg;
color: $link_color;
display: block;
padding: 1em;
text-align: center;
text-decoration: none;
transition: background-color .25s ease;
&:hover {
background: lighten($nav_bg, 10%);
}
}
}