-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdark.css
121 lines (107 loc) · 2.31 KB
/
dark.css
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
110
111
112
113
114
115
116
117
118
119
120
121
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,200;1,300;1,600;1,900&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
body {
--primary-color: #e7e0ee;
--sec-color: #f3f1f5;
--hover-color: #11052c;
--color: #1f1f1f;
--text-color: #f3f1f5;
}
body[data-theme="dark"] {
--primary-color: #0f0f0f;
--sec-color: #1a1a1a;
--hover-color: #ededed;
--color: #f0f0f0;
--text-color: #1f1f1f;
}
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background: var(--primary-color);
color: var(--color);
}
.card {
width: 350px;
height: 350px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.151);
background: var(--sec-color);
border-radius: 10px;
}
.card img {
width: 150px;
height: 150px;
border-radius: 50%;
}
a {
font-size: 18px;
font-weight: 500;
margin-left: 25px;
transition: color 0.3s ease;
}
.btn {
display: inline-block;
text-decoration: none;
font-weight: 500;
color: #ff006e;
border: 1px solid #111;
padding: 12px 34px;
font-size: 15px;
border-radius: 2px;
position: relative;
left: -10px;
cursor: pointer;
}
.btn:hover {
border: none;
color: #fff;
font-style: bold;
font-weight: 500;
font-size: 15px;
background: #219ebc;
transition: 0.1s;
}
.darkMode {
width: 100px;
height: 50px;
position: absolute;
top: 50%;
left: -5px;
transform: translate(-50%);
border-radius: 10px;
overflow: hidden;
}
.darkMode .box {
position: absolute;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: space-around;
background-color: var(--sec-color);
transition: all .4s;
}
.darkMode input {
position: absolute;
width: 100%;
height: 100%;
-webkit-appearance: none;
cursor: pointer;
z-index: 10;
}
.darkMode input:checked~.box {
transform: rotate(180deg);
}
.darkMode input:checked~.box i {
transform: rotate(180deg);
}