Spaces:
Build error
Build error
Upload src/app.css with huggingface_hub
Browse files- src/app.css +120 -52
src/app.css
CHANGED
@@ -1,79 +1,147 @@
|
|
|
|
1 |
:root {
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
text-
|
12 |
-
-
|
13 |
-
-
|
|
|
|
|
14 |
}
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
}
|
21 |
-
a:hover {
|
22 |
-
color: #535bf2;
|
23 |
}
|
24 |
|
25 |
body {
|
26 |
-
|
|
|
27 |
display: flex;
|
28 |
-
|
29 |
-
|
30 |
min-height: 100vh;
|
|
|
31 |
}
|
32 |
|
33 |
-
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
|
|
36 |
}
|
37 |
|
38 |
-
.
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
}
|
41 |
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
}
|
48 |
|
49 |
button {
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
font-
|
55 |
-
|
56 |
-
background-color: #1a1a1a;
|
57 |
cursor: pointer;
|
58 |
-
transition:
|
|
|
59 |
}
|
|
|
60 |
button:hover {
|
61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
}
|
63 |
-
|
64 |
-
button:
|
65 |
-
|
66 |
}
|
67 |
|
68 |
-
|
69 |
-
:
|
70 |
-
|
71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
}
|
73 |
-
|
74 |
-
|
|
|
75 |
}
|
|
|
76 |
button {
|
77 |
-
|
|
|
78 |
}
|
79 |
-
}
|
|
|
1 |
+
/* src/app.css */
|
2 |
:root {
|
3 |
+
--bg-color: #f5f5f5;
|
4 |
+
--calculator-bg: #1a1a1a;
|
5 |
+
--display-bg: #2a2a2a;
|
6 |
+
--button-bg: #3a3a3a;
|
7 |
+
--button-hover: #4a4a4a;
|
8 |
+
--operator-bg: #ff9500;
|
9 |
+
--operator-hover: #ffaa33;
|
10 |
+
--function-bg: #505050;
|
11 |
+
--function-hover: #606060;
|
12 |
+
--text-color: #ffffff;
|
13 |
+
--text-secondary: #cccccc;
|
14 |
+
--border-radius: 12px;
|
15 |
+
--button-radius: 8px;
|
16 |
+
--transition: all 0.2s ease;
|
17 |
}
|
18 |
|
19 |
+
* {
|
20 |
+
box-sizing: border-box;
|
21 |
+
margin: 0;
|
22 |
+
padding: 0;
|
|
|
|
|
|
|
23 |
}
|
24 |
|
25 |
body {
|
26 |
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
27 |
+
background-color: var(--bg-color);
|
28 |
display: flex;
|
29 |
+
align-items: center;
|
30 |
+
justify-content: center;
|
31 |
min-height: 100vh;
|
32 |
+
padding: 20px;
|
33 |
}
|
34 |
|
35 |
+
.calculator {
|
36 |
+
background-color: var(--calculator-bg);
|
37 |
+
border-radius: var(--border-radius);
|
38 |
+
padding: 20px;
|
39 |
+
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
|
40 |
+
width: 100%;
|
41 |
+
max-width: 340px;
|
42 |
}
|
43 |
|
44 |
+
.display {
|
45 |
+
background-color: var(--display-bg);
|
46 |
+
border-radius: var(--border-radius);
|
47 |
+
padding: 20px;
|
48 |
+
margin-bottom: 20px;
|
49 |
+
text-align: right;
|
50 |
+
min-height: 80px;
|
51 |
+
display: flex;
|
52 |
+
flex-direction: column;
|
53 |
+
justify-content: center;
|
54 |
+
word-wrap: break-word;
|
55 |
+
word-break: break-all;
|
56 |
}
|
57 |
|
58 |
+
.display-text {
|
59 |
+
font-size: 2.5rem;
|
60 |
+
font-weight: 300;
|
61 |
+
color: var(--text-color);
|
62 |
+
line-height: 1.2;
|
63 |
+
}
|
64 |
+
|
65 |
+
.error {
|
66 |
+
font-size: 0.875rem;
|
67 |
+
color: #ff6b6b;
|
68 |
+
margin-top: 5px;
|
69 |
+
}
|
70 |
+
|
71 |
+
.buttons {
|
72 |
+
display: grid;
|
73 |
+
grid-template-columns: repeat(4, 1fr);
|
74 |
+
gap: 10px;
|
75 |
}
|
76 |
|
77 |
button {
|
78 |
+
background-color: var(--button-bg);
|
79 |
+
color: var(--text-color);
|
80 |
+
border: none;
|
81 |
+
border-radius: var(--button-radius);
|
82 |
+
font-size: 1.5rem;
|
83 |
+
padding: 20px;
|
|
|
84 |
cursor: pointer;
|
85 |
+
transition: var(--transition);
|
86 |
+
font-weight: 300;
|
87 |
}
|
88 |
+
|
89 |
button:hover {
|
90 |
+
background-color: var(--button-hover);
|
91 |
+
transform: translateY(-1px);
|
92 |
+
}
|
93 |
+
|
94 |
+
button:active {
|
95 |
+
transform: translateY(0);
|
96 |
+
}
|
97 |
+
|
98 |
+
button.function {
|
99 |
+
background-color: var(--function-bg);
|
100 |
+
}
|
101 |
+
|
102 |
+
button.function:hover {
|
103 |
+
background-color: var(--function-hover);
|
104 |
+
}
|
105 |
+
|
106 |
+
button.operator {
|
107 |
+
background-color: var(--operator-bg);
|
108 |
+
font-size: 1.75rem;
|
109 |
+
font-weight: 400;
|
110 |
}
|
111 |
+
|
112 |
+
button.operator:hover {
|
113 |
+
background-color: var(--operator-hover);
|
114 |
}
|
115 |
|
116 |
+
button.equals {
|
117 |
+
background-color: var(--operator-bg);
|
118 |
+
grid-column: 3 / 5;
|
119 |
+
}
|
120 |
+
|
121 |
+
button.equals:hover {
|
122 |
+
background-color: var(--operator-hover);
|
123 |
+
}
|
124 |
+
|
125 |
+
button.zero {
|
126 |
+
grid-column: 1 / 3;
|
127 |
+
}
|
128 |
+
|
129 |
+
@media (max-width: 480px) {
|
130 |
+
.calculator {
|
131 |
+
padding: 15px;
|
132 |
+
}
|
133 |
+
|
134 |
+
.display {
|
135 |
+
padding: 15px;
|
136 |
+
min-height: 70px;
|
137 |
}
|
138 |
+
|
139 |
+
.display-text {
|
140 |
+
font-size: 2rem;
|
141 |
}
|
142 |
+
|
143 |
button {
|
144 |
+
font-size: 1.25rem;
|
145 |
+
padding: 15px;
|
146 |
}
|
147 |
+
}
|