-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_header.scss
109 lines (99 loc) · 2.33 KB
/
_header.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
/*=============== HEADER ===============*/
.header{
width: 100%;
background-color: var(--body-color);
position: fixed;
top: 0;
left: 0;
z-index: var(--z-fixed);
transition: .4s; // For animation dark mode
}
/*=============== NAV ===============*/
.nav{
height: var(--header-height);
display: flex;
justify-content: space-between;
align-items: center;
&__logo,
&__toggle,
&__close{
color: var(--title-color);
}
&__logo{
text-transform: uppercase;
font-weight: 700;
letter-spacing: -1px;
display: inline-flex;
align-items: center;
column-gap: .5rem;
transition: .3s;
&:hover{
color: var(--first-color);
}
&-icon{
font-size: 1.15rem;
color: var(--first-color);
}
}
&__toggle{
display: inline-flex;
font-size: 1.25rem;
cursor: pointer;
}
&__menu{
@media screen and (max-width: 767px){
position: fixed;
background-color: var(--container-color);
width: 80%;
height: 100%;
top: 0;
right: -100%;
box-shadow: -2px 0 4px hsla(var(--hue), 24%, 15%, .1);
padding: 4rem 0 0 3rem;
border-radius: 1rem 0 0 1rem;
transition: .3s;
z-index: var(--z-fixed);
}
}
&__close{
font-size: 1.5rem;
position: absolute;
top: 1rem;
right: 1.25rem;
cursor: pointer;
}
&__list{
display: flex;
flex-direction: column;
row-gap: 1.5rem;
}
&__link{
color: var(--title-color);
font-weight: var(--font-medium);
&:hover{
color: var(--first-color);
}
}
}
/* Show menu */
.show-menu{
right: 0;
}
/* Change background header */
.scroll-header{
box-shadow: 0 1px 4px hsla(var(--hue), 4%, 15%, .10);;
}
/* Active link */
.active-link{
position: relative;
color: var(--first-color);
&::after{
content: '';
position: absolute;
bottom: -.5rem;
left: 0;
width: 50%;
height: 2px;
background-color: var(--first-color);
}
}