-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcalculator.css
More file actions
148 lines (129 loc) · 2.5 KB
/
Copy pathcalculator.css
File metadata and controls
148 lines (129 loc) · 2.5 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
/* General page styling */
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background: linear-gradient(to right, #ff007f, #ff4d4d);
margin: 0;
font-family: Arial, Helvetica, sans-serif;
transition: background 0.3s;
}
/* Container styling */
.container {
position: relative;
}
/* Theme toggle switch positioning */
.theme-toggle {
position: absolute;
top: -30px;
right: 10px;
}
/* Hide default checkbox */
.theme-toggle input {
display: none;
}
/* Toggle label styling */
.theme-toggle-label {
width: 40px;
height: 20px;
background: #ddd;
display: block;
border-radius: 50px;
position: relative;
cursor: pointer;
}
/* Toggle knob */
.theme-toggle-label::after {
content: "";
position: absolute;
width: 18px;
height: 18px;
background: #ff007f;
border-radius: 50%;
top: 1px;
left: 1px;
transition: transform 0.3s;
}
/* Toggle active state */
input:checked + .theme-toggle-label::after {
transform: translateX(20px);
}
/* Calculator container */
.calculator {
width: 280px;
background: white;
padding: 20px;
border-radius: 30px;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
transition: background 0.3s, color 0.3s;
}
/* Dark theme calculator */
.dark .calculator {
background: #111;
color: white;
}
/* Display styling */
.display {
text-align: right;
padding: 15px;
font-size: 36px;
font-weight: bold;
border-radius: 15px;
background: none;
}
/* Button grid */
.button {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 10px;
margin-top: 10px;
}
/* General button styling */
.btn {
width: 100%;
height: 55px;
font-size: 22px;
border: none;
border-radius: 15px;
cursor: pointer;
background: rgba(0, 0, 0, 0.2);
transition: 0.3s;
font-weight: bold;
}
/* Button hover */
.btn:hover {
background: rgba(0, 0, 0, 0.5);
}
/* Operator buttons */
.operator {
background: #ff007f;
color: white;
}
/* Equals button */
.equal {
background: #ff4d4d;
color: white;
grid-column: span 2;
}
/* Zero button */
.zero {
grid-column: span 2;
}
/* Delete button (2nd button) */
.btn:nth-child(2) {
background: #ff007f;
color: white;
}
/* Dark mode - all buttons text white */
.dark .btn {
color: white;
}
/* Dark mode operator button */
.dark .operator {
background: #ff4d4d;
}
/* Dark mode equals button */
.dark .equal {
background: #ff007f;
}