forked from Anushkabh/krishiconnect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
darkmode.css
87 lines (74 loc) · 1.52 KB
/
darkmode.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
.toggle {
cursor: pointer;
position: relative;
display: flex;
justify-content: space-between;
width: 60px;
height: 30px;
border:2px solid white;
/* Further adjusted width to make the toggle box smaller */
border-radius: 25px;
/* Adjusted for smaller height */
transition: .2s;
}
.toggle i {
width: 50%;
line-height: 30px;
/* Adjusted to match smaller height */
text-align: center;
font-size: 16px;
/* Adjusted font size for smaller icons */
z-index: 1;
}
.toggle .ball {
position: absolute;
width: 25px;
/* Adjusted ball size */
height: 25px;
/* Adjusted ball size */
margin: 2.5px;
/* Adjusted margin to center the ball */
border-radius: 50%;
transition: .3s ease-out;
}
input {
display: none;
}
/* -- Light Mode -- */
.light {
background: #fafafa;
}
.light .toggle {
background: linear-gradient(145deg, #e1e1e1, #fff);
box-shadow: 3px 3px 4px #e6e6e6,
-3px -3px 4px #ffffff;
}
.light .toggle .bxs-sun {
color: #fafafa;
}
.light .toggle .bx-moon {
color: #198754;
}
.light .toggle .ball {
background: #198754;
}
/* -- Dark Mode -- */
.dark {
background: #151d2a;
}
.dark .toggle {
background: #151d2a;
box-shadow: 3px 3px 3px #0e131b,
-3px -3px 3px #1c2739;
}
.dark .toggle .bx-sun {
color: #fafafa;
}
.dark .toggle .bxs-moon {
color: #151d2a;
}
.dark .toggle .ball {
background: #fafafa;
transform: translateX(30px);
/* Adjusted for smaller toggle width */
}