-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
127 lines (122 loc) · 2.46 KB
/
style.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
122
123
124
125
126
127
:root {
/* Color for Light Mode */
--bg-color:#F1EAFF;
--bg-text-color: #000;
--text-color: #000;
--keypad-bg-color: #F1EAFF;
--keypad-bg-color2: #fff;
/* color for Dark Mode */
--bg-color:#040D12;
--bg-text-color: #fff;
--text-color: #fff;
--keypad-bg-color: #040D12;
--keypad-bg-color2: #183D3D;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.heading {
height: 5vh;
font-size: 1em;
font-weight: 700;
color: var(--text-color);
}
body {
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background-color: var(--bg-color);
flex-direction: column;
}
.calculator {
height: 550px;
max-width: 350px;
padding: 20px;
background-color: var(--keypad-bg-color);
border-radius: 10px;
display: flex;
flex-direction: column;
gap: 10px;
border: 5px solid black;
}
/* display result section */
.display {
height: 20%;
border-radius: 5px;
border: 2px solid black;
background-color: var(--bg-color);
}
.display input {
height: 100%;
width: 100%;
background-color: transparent;
border: none;
outline: none;
text-align: right;
font-size: 2em;
color: var(--text-color);
}
/* Theme Switch Section */
.theme-switch {
display: flex;
align-items: center;
justify-content: flex-end;
margin-bottom: 10px;
}
.theme-toggle-label {
height: 20px;
width: 40px;
display: inline-block;
background-color: var(--keypad-bg-color2);
border:2px solid black;
border-radius: 20px;
position: relative;
cursor: pointer;
}
.theme-toggle-label:after {
content: "";
position: absolute;
width: 16px;
height: 16px;
background-color: #fff;
border-radius: 50%;
transition: 0.3s ease;
}
.theme-switch input {
display: none;
}
.theme-switch input:checked+.theme-toggle-label::after {
transform: translateX(20px);
}
/* Button Section */
.keys {
display: grid;
grid-template-columns: repeat(4,1fr);
gap: 20px;
height: 70%;
}
.keys button{
border-radius: 5px;
padding: 5px;
font-size: 2em;
cursor: pointer;
outline: none;
background-color: var(--bg-color);
color: var(--text-color);
}
button:hover {
background-color: green;
color: white;
transition: 1s;
}
.keys button.equal{
background-color: orange;
}
.keys button.equal:hover {
background-color: green;
color: white;
transition: 1s;
}