-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
125 lines (103 loc) · 2.42 KB
/
style.css
File metadata and controls
125 lines (103 loc) · 2.42 KB
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
122
123
124
125
:root {
--bg-color: #F1EAFF;
--text-color: #D67BFF;
--keypad-bg-color: #F1EAFF;
--keypad-bg-color2: #D0A2F7;
/*
--bg-color: #040D12;
--text-color: #93B1A6;
--keypad-bg-color: #040D12;
--keypad-bg-color2: #183D3D; */
}
body {
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
margin: 0;
background-color: var(--bg-color);
}
.calculator {
aspect-ratio: 9/16;
width: 100%;
max-width: 350px;
background-color: var(--keypad-bg-color);
box-shadow: 0 0 10px rgba(255, 255, 255, 0.592);
border-radius: 20px;
padding: 20px;
display: flex;
flex-direction: column;
gap: 10px;
}
.calculator .display {
background-color: var(--bg-color);
border-radius: 5px;
box-shadow: 0 0 10px rgba(255, 255, 255, 0.681);
padding: 10px;
height: 20%;
}
.calculator .display input {
width: 100%;
height: 100%;
background-color: transparent;
border: none;
outline: none;
text-align: right;
font-size: 2rem;
color: var(--text-color);
}
.calculator .keys {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 20px;
height: 80%;
cursor: pointer;
}
.calculator .keys button {
background-color: var(--bg-color);
border: none;
border-radius: 5px;
padding: 10px;
font-size: 2rem;
color: var(--text-color);
cursor: pointer;
outline: none;
box-shadow: 1px 1px 5px var(--keypad-bg-color2), -1px -1px 5px var(--keypad-bg-color2);
}
.calculator .keys .equalbtn {
grid-column: 3/5;
background-color: var(--keypad-bg-color2);
color: white;
}
.theme-switch {
display: flex;
align-items: center;
justify-content: flex-end;
margin-bottom: 10px;
}
.theme-toggle-label{
display: inline-block;
width: 40px;
height: 20px;
background-color: var(--keypad-bg-color2);
border-radius: 20px;
position: relative;
cursor: pointer;
}
.theme-toggle-label:after{
content: '';
position: absolute;
width: 18px;
height: 18px;
border-radius: 50%;
background-color: var(--text-color);
top: 1px;
left: 1px;
transition: transform 0.3s ease;
}
.theme-switch input{
display: none;
}
.theme-switch input:checked+.theme-toggle-label:after{
transform: translateX(20px);
}