@@ -18,10 +18,12 @@ body {
18
18
margin-bottom : 1em ;
19
19
float : none ;
20
20
display : block ;
21
+ .font-rem (24 );
21
22
@media @600px {
22
23
.grid (12 ,2 );
23
24
.prefix (12 ,0.5 );
24
25
.suffix (12 ,0.5 );
26
+ .font-rem (16 );
25
27
}
26
28
@media @1382px {
27
29
.grid (12 ,1.5 );
@@ -44,22 +46,161 @@ body {
44
46
.grid (12 ,8 );
45
47
}
46
48
ul {
47
- list-style : none ;
48
49
margin : 0 ;
49
50
padding : 0 ;
51
+ clear : both ;
52
+ list-style-type : none ;
50
53
}
51
54
li {
55
+ display : block ;
52
56
list-style-type : none ;
53
- display : inline ;
54
- margin-right : 25px ;
55
- white-space : nowrap ;
57
+ border-bottom : 1px solid lighten (@black ,80 );
58
+ border-bottom : 1px solid fade (@black ,10 );
59
+ .font-rem (16 );
60
+ & :last-child {
61
+ border-bottom : 0 solid transparent ;
62
+ }
63
+ @media @600px {
64
+ display : inline ;
65
+ margin-right : 25px ;
66
+ white-space : nowrap ;
67
+ border-bottom : 0 solid transparent ;
68
+ }
56
69
a {
70
+ display : block ;
71
+ padding : 10px 0 ;
57
72
decoration : none ;
58
73
border-bottom : 0 solid transparent ;
59
74
.transition (all .2s );
75
+ @media @600px {
76
+ display : inline ;
77
+ padding : 0 ;
78
+ }
60
79
}
61
80
}
62
81
}
82
+ // Navicon lines
83
+ @button-size : 1.5rem ;
84
+ .line () {
85
+ display : inline-block ;
86
+ width : @button-size ;
87
+ height : @button-size / 7 ;
88
+ // line color
89
+ background : @white ;
90
+ border-radius : @button-size / 14 ;
91
+ transition : .3s ;
92
+ }
93
+ .lines-button {
94
+ padding : @button-size / 4 @button-size / 2 ;
95
+ transition : .3s ;
96
+ cursor : pointer ;
97
+ user-select : none ;
98
+ border-radius : @button-size / 7 ;
99
+ }
100
+ .lines-button :hover {
101
+ opacity : 1 ;
102
+ }
103
+ .lines-button :active {
104
+ transition : 0 ;
105
+ }
106
+ .lines {
107
+ margin-right : 10px ;
108
+ margin-bottom : @button-size / 5 ;
109
+ // create middle line
110
+ .line ();
111
+ position : relative ;
112
+ // create the upper and lower lines as pseudo-elements of the middle line
113
+ & :before ,
114
+ & :after {
115
+ .line ();
116
+ position : absolute ;
117
+ left : 0 ;
118
+ content : ' ' ;
119
+ -webkit-transform-origin : @button-size / 14 center ;
120
+ transform-origin : @button-size / 14 center ;
121
+ }
122
+ & :before { top : @button-size / 4 ; }
123
+ & :after { top : - @button-size / 4 ; }
124
+ }
125
+ .lines-button :hover {
126
+ opacity : 1 ;
127
+ .lines {
128
+ & :before { top : @button-size / 3.5 ; }
129
+ & :after { top : - @button-size / 3.5 ; }
130
+ }
131
+ }
132
+ .lines-button.x.active .lines {
133
+ // hide the middle line
134
+ background : transparent ;
135
+ // overlap the lines by setting both their top values to 0
136
+ & :before ,
137
+ & :after {
138
+ -webkit-transform-origin : 50% 50% ;
139
+ transform-origin : 50% 50% ;
140
+ top : 0 ;
141
+ width : @button-size ;
142
+ }
143
+ // rotate the lines to form the x shape
144
+ & :before {
145
+ -webkit-transform : rotate3d (0 ,0 ,1 ,45deg );
146
+ transform : rotate3d (0 ,0 ,1 ,45deg );
147
+ }
148
+ & :after {
149
+ -webkit-transform : rotate3d (0 ,0 ,1 ,-45deg );
150
+ transform : rotate3d (0 ,0 ,1 ,-45deg );
151
+ }
152
+ }
153
+ // Style the toggle menu link and hide it
154
+ .nav .navtoogle {
155
+ .font-rem (18 );
156
+ font-weight : normal ;
157
+ background-color : @black ;
158
+ color : @white ;
159
+ border : none ;
160
+ cursor : pointer ;
161
+ @media @600px {
162
+ display : none ;
163
+ }
164
+ }
165
+ .nav button {
166
+ border : none ;
167
+ background : none ;
168
+ }
169
+ .navtoogle i {
170
+ z-index :-1 ;
171
+ }
172
+ .icon-menu {
173
+ position : relative ;
174
+ top : 3px ;
175
+ line-height : 0 ;
176
+ }
177
+ // When JavaScript is disabled, we hide the toggle button
178
+ .no-js .nav .navtoggle {
179
+ display : none ;
180
+ }
181
+ // When JavaScript is disabled, we show the menu
182
+ .no-js .nav ul {
183
+ max-height : 30em ;
184
+ overflow : hidden ;
185
+ }
186
+ // When JavaScript is enabled, we hide the menu
187
+ .js .nav ul {
188
+ max-height : 0 ;
189
+ overflow : hidden ;
190
+ @media @600px {
191
+ max-height : 30em ;
192
+ }
193
+ }
194
+ // Displaying the menu when the user has clicked on the button
195
+ .js .nav .active + ul {
196
+ max-height : 30em ;
197
+ overflow : hidden ;
198
+ -webkit-transition : max - height .4s ;
199
+ -moz-transition : max - height .4s ;
200
+ -o-transition : max - height .4s ;
201
+ -ms-transition : max - height .4s ;
202
+ transition : max - height .4s ;
203
+ }
63
204
#main {
64
205
counter-reset : captions;
65
206
.container ();
0 commit comments