-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.css
137 lines (119 loc) · 2.63 KB
/
styles.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
128
129
130
131
132
133
134
135
136
137
:root {
--primary-bg: #ffffff;
--primary-text: #000000;
--secondary-bg: #222222;
--secondary-text: #ffffff;
--btn-bg: #e0e0e0;
--btn-hover-bg: #d0d0d0;
--operator-bg: #ff9500;
--operator-hover-bg: #e68a00;
--clear-bg: #f44336;
--clear-hover-bg: #d32f2f;
--backspace-bg: #ff5722;
--backspace-hover-bg: #e64a19;
}
[data-theme="dark"] {
--primary-bg: #121212;
--primary-text: #e0e0e0;
--secondary-bg: #424242;
--secondary-text: #ffffff;
--btn-bg: #424242;
--btn-hover-bg: #616161;
--operator-bg: #ff9800;
--operator-hover-bg: #fb8c00;
--clear-bg: #e53935;
--clear-hover-bg: #c62828;
--backspace-bg: #d84315;
--backspace-hover-bg: #bf360c;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
background-color: var(--primary-bg);
color: var(--primary-text);
font-family: Arial, sans-serif;
transition: background-color 0.3s, color 0.3s;
}
.calculator {
background-color: var(--primary-bg);
border-radius: 10px;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
width: 350px;
padding: 20px;
}
.display {
background-color: var(--secondary-bg);
color: var(--secondary-text);
font-size: 2.5em;
padding: 20px;
border-radius: 10px;
text-align: right;
margin-bottom: 20px;
user-select: none;
}
.buttons {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 10px;
}
.btn {
padding: 20px;
font-size: 1.5em;
border: none;
border-radius: 10px;
background-color: var(--btn-bg);
color: var(--primary-text);
cursor: pointer;
transition: background-color 0.3s;
}
.btn:hover {
background-color: var(--btn-hover-bg);
}
.btn[data-type="operator"] {
background-color: var(--operator-bg);
color: var(--secondary-text);
}
.btn[data-type="operator"]:hover {
background-color: var(--operator-hover-bg);
}
.btn[data-type="clear"] {
background-color: var(--clear-bg);
color: var(--secondary-text);
}
.btn[data-type="clear"]:hover {
background-color: var(--clear-hover-bg);
}
.btn[data-type="backspace"] {
background-color: var(--backspace-bg);
color: var(--secondary-text);
}
.btn[data-type="backspace"]:hover {
background-color: var(--backspace-hover-bg);
}
.btn[data-type="equal"] {
grid-column: span 1;
}
.theme-toggle {
margin-bottom: 20px;
}
.theme-toggle button {
padding: 10px 20px;
font-size: 1em;
border: none;
border-radius: 5px;
background-color: var(--btn-bg);
color: var(--primary-text);
cursor: pointer;
transition: background-color 0.3s, color 0.3s;
}
.theme-toggle button:hover {
background-color: var(--btn-hover-bg);
}