|
1 | | -/* |
2 | | -=============== |
3 | | -Variables |
4 | | -=============== |
5 | | -*/ |
6 | | - |
7 | 1 | :root { |
8 | 2 | /* dark shades of primary color*/ |
9 | 3 | --clr-primary-1: hsl(205, 86%, 17%); |
@@ -119,114 +113,158 @@ p { |
119 | 113 | line-height: 1; |
120 | 114 | } |
121 | 115 | } |
122 | | -/* global classes */ |
123 | 116 |
|
124 | | -/* section */ |
125 | | -.section { |
126 | | - width: 90vw; |
127 | | - margin: 0 auto; |
128 | | - max-width: var(--max-width); |
| 117 | +/* main */ |
| 118 | + |
| 119 | +nav |
| 120 | +{ |
| 121 | + background: var(--clr-white); |
| 122 | + box-shadow: var(--light-shadow); |
129 | 123 | } |
130 | 124 |
|
131 | | -@media screen and (min-width: 992px) { |
132 | | - .section { |
133 | | - width: 95vw; |
134 | | - } |
| 125 | +.social-icons |
| 126 | +{ |
| 127 | + display: none; |
135 | 128 | } |
136 | 129 |
|
137 | | -/* |
138 | | -=============== |
139 | | -Navbar |
140 | | -=============== |
141 | | -*/ |
142 | | -nav { |
143 | | - background: var(--clr-white); |
144 | | - box-shadow: var(--light-shadow); |
| 130 | +.links-container |
| 131 | +{ |
| 132 | + height: 0; |
| 133 | + overflow: hidden; |
| 134 | + transition: var(--transition); |
| 135 | +} |
| 136 | + |
| 137 | +.links-container ul |
| 138 | +{ |
| 139 | + letter-spacing: 2px; |
| 140 | + text-transform: capitalize; |
| 141 | + font-size: 1rem; |
| 142 | +} |
| 143 | + |
| 144 | +.links-container a |
| 145 | +{ |
| 146 | + color: var(--clr-grey-3); |
| 147 | + text-transform: capitalize; |
| 148 | + letter-spacing: var(--spacing); |
| 149 | + display: block; |
| 150 | + padding: .5rem 1rem; |
| 151 | + transition: var(--transition); |
| 152 | +} |
| 153 | + |
| 154 | +.links-container a:hover |
| 155 | +{ |
| 156 | + margin: 0 0 0 1rem; |
145 | 157 | } |
146 | | -.nav-header { |
| 158 | + |
| 159 | +.links li:hover |
| 160 | +{ |
| 161 | + background: var(--clr-primary-7); |
| 162 | + transition: var(--transition); |
| 163 | +} |
| 164 | + |
| 165 | +.nav-header |
| 166 | +{ |
147 | 167 | display: flex; |
148 | | - align-items: center; |
149 | 168 | justify-content: space-between; |
| 169 | + align-items: center; |
150 | 170 | padding: 1rem; |
151 | 171 | } |
152 | | -.nav-toggle { |
153 | | - font-size: 1.5rem; |
| 172 | + |
| 173 | +.logo |
| 174 | +{ |
| 175 | + height: 40px; |
| 176 | +} |
| 177 | + |
| 178 | + |
| 179 | +.nav-toggle |
| 180 | +{ |
154 | 181 | color: var(--clr-primary-5); |
155 | | - background: transparent; |
156 | 182 | border-color: transparent; |
157 | | - transition: var(--transition); |
| 183 | + outline: none; |
| 184 | + font-size: 1.5rem; |
| 185 | + background: transparent; |
158 | 186 | cursor: pointer; |
159 | | -} |
160 | | -.nav-toggle:hover { |
161 | | - color: var(--clr-primary-1); |
162 | | - transform: rotate(90deg); |
163 | | -} |
164 | | -.logo { |
165 | | - height: 40px; |
166 | | -} |
167 | | -.links a { |
168 | | - color: var(--clr-grey-3); |
169 | | - font-size: 1rem; |
170 | | - text-transform: capitalize; |
171 | | - letter-spacing: var(--spacing); |
172 | | - display: block; |
173 | | - padding: 0.5rem 1rem; |
174 | 187 | transition: var(--transition); |
175 | 188 | } |
176 | | -.links a:hover { |
177 | | - background: var(--clr-primary-8); |
178 | | - color: var(--clr-primary-5); |
179 | | - padding-left: 1.5rem; |
180 | | -} |
181 | | -.social-icons { |
182 | | - display: none; |
| 189 | + |
| 190 | +.nav-toggle:hover |
| 191 | +{ |
| 192 | + transform: rotate(90deg); |
| 193 | + color: var(--clr-primary-1); |
183 | 194 | } |
184 | | -.links-container { |
185 | | - height: 0; |
186 | | - overflow: hidden; |
187 | | - transition: var(--transition); |
| 195 | + |
| 196 | +.links-container a:hover |
| 197 | +{ |
| 198 | + color: white; |
188 | 199 | } |
189 | | -.show-container { |
190 | | - height: 10rem; |
| 200 | + |
| 201 | +@media only screen and (min-width: 800px) |
| 202 | +{ |
| 203 | + .nav-center |
| 204 | +{ |
| 205 | + display: flex; |
| 206 | + justify-content: space-around; |
| 207 | + align-items: center; |
191 | 208 | } |
192 | | -@media screen and (min-width: 800px) { |
193 | | - .nav-center { |
194 | | - max-width: 1170px; |
195 | | - margin: 0 auto; |
196 | | - display: flex; |
197 | | - align-items: center; |
198 | | - justify-content: space-between; |
199 | | - padding: 1rem; |
200 | | - } |
201 | | - .nav-header { |
202 | | - padding: 0; |
203 | | - } |
204 | | - .nav-toggle { |
| 209 | + .nav-toggle |
| 210 | + { |
205 | 211 | display: none; |
206 | 212 | } |
207 | | - .links-container { |
208 | | - height: auto !important; |
| 213 | + .links-container,.social-icons |
| 214 | + { |
| 215 | + display: block; |
| 216 | + height: auto!important; |
209 | 217 | } |
210 | | - .links { |
| 218 | + .links |
| 219 | + { |
211 | 220 | display: flex; |
| 221 | + justify-content: space-between; |
| 222 | + align-items: center; |
212 | 223 | } |
213 | | - .links a { |
214 | | - padding: 0; |
215 | | - margin: 0 0.5rem; |
| 224 | + .links a |
| 225 | + { |
| 226 | + margin:0 .5rem; |
| 227 | + text-transform: capitalize; |
| 228 | + color: var(--clr-grey-3); |
| 229 | + transition: var(--transition); |
| 230 | + letter-spacing: var(--spacing); |
216 | 231 | } |
217 | | - .links a:hover { |
218 | | - padding: 0; |
| 232 | + |
| 233 | + .links li:hover |
| 234 | + { |
219 | 235 | background: transparent; |
| 236 | + |
220 | 237 | } |
221 | | - .social-icons { |
222 | | - display: flex; |
223 | | - } |
224 | | - .social-icons a { |
225 | | - margin: 0 0.5rem; |
| 238 | + |
| 239 | + .links a:hover |
| 240 | + { |
226 | 241 | color: var(--clr-primary-5); |
227 | | - transition: var(--transition); |
228 | 242 | } |
229 | | - .social-icons a:hover { |
230 | | - color: var(--clr-primary-7); |
| 243 | + |
| 244 | + .links-container a:hover |
| 245 | + { |
| 246 | + margin: 0 .5rem; |
| 247 | + } |
| 248 | + |
| 249 | + .social-icons |
| 250 | + { |
| 251 | + display: flex; |
| 252 | + justify-content: center; |
| 253 | + align-items: center; |
231 | 254 | } |
| 255 | + .social-icons ul li a |
| 256 | + { |
| 257 | + margin: 0 .5rem; |
| 258 | + color: var(--clr-primary-5); |
| 259 | + transition: var(--transition); |
| 260 | + } |
| 261 | + .social-icons ul li a:hover |
| 262 | + { |
| 263 | + color: var(--clr-primary-7); |
| 264 | + |
| 265 | + } |
232 | 266 | } |
| 267 | + |
| 268 | + |
| 269 | + |
| 270 | + |
0 commit comments