Spaces:
Running
Running
Update src/App.scss
Browse files- src/App.scss +64 -74
src/App.scss
CHANGED
@@ -1,8 +1,6 @@
|
|
1 |
// src/App.scss
|
2 |
|
3 |
// 1. Import Tailwind's base, components, and utilities
|
4 |
-
// این خطوط فرض میکنند که Tailwind به عنوان یک وابستگی npm نصب شده است.
|
5 |
-
// اگر از CDN استفاده میکنید، این خطوط را حذف کنید و Tailwind از طریق CDN بارگذاری میشود.
|
6 |
@import 'tailwindcss/base';
|
7 |
@import 'tailwindcss/components';
|
8 |
@import 'tailwindcss/utilities';
|
@@ -16,7 +14,6 @@
|
|
16 |
--popover: oklch(1 0 0);
|
17 |
--popover-foreground: oklch(0.145 0 0);
|
18 |
--border: oklch(0.922 0 0);
|
19 |
-
// --ring: oklch(0.6 0.15 260); // Example ring color if needed for outline-ring/50
|
20 |
}
|
21 |
|
22 |
.dark {
|
@@ -25,33 +22,24 @@
|
|
25 |
--popover: oklch(0.205 0 0);
|
26 |
--popover-foreground: oklch(0.985 0 0);
|
27 |
--border: oklch(1 0 0 / 10%);
|
28 |
-
// --ring: oklch(0.7 0.1 250); // Example dark ring color
|
29 |
}
|
30 |
|
31 |
-
// 3. Apply base styles
|
32 |
-
// اگر از @import های بالا استفاده نمیکنید (مثلاً با CDN)، این بخش @layer ممکن است کار نکند
|
33 |
-
// و باید استایلهای body را به صورت CSS معمولی بنویسید.
|
34 |
@layer base {
|
35 |
* {
|
36 |
-
// استفاده از متغیر --border برای رنگ بوردر
|
37 |
-
// ترجمه outline-ring/50 به CSS استاندارد بدون دانستن تعریف دقیق آن در Tailwind سخت است.
|
38 |
-
// میتوانید یک outline سادهتر قرار دهید یا اگر در tailwind.config.js تعریف شده، @apply کار خواهد کرد.
|
39 |
border-color: var(--border);
|
40 |
-
outline-color: var(--foreground);
|
41 |
}
|
42 |
body {
|
43 |
-
@apply bg-background text-foreground;
|
44 |
-
// اگر Tailwind پردازش نمیکند، معادل CSS آن را بنویسید:
|
45 |
-
// background-color: var(--background);
|
46 |
-
// color: var(--foreground);
|
47 |
overflow-x: hidden;
|
48 |
-
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
49 |
-webkit-font-smoothing: antialiased;
|
50 |
-moz-osx-font-smoothing: grayscale;
|
51 |
}
|
52 |
}
|
53 |
|
54 |
-
// 4. Styles for components
|
55 |
|
56 |
/* Notification Popover */
|
57 |
.notification-popover-wrapper {
|
@@ -61,7 +49,7 @@
|
|
61 |
transform: translateX(-50%);
|
62 |
z-index: 100;
|
63 |
width: calc(100% - 2rem);
|
64 |
-
max-width: 28rem;
|
65 |
display: flex;
|
66 |
justify-content: center;
|
67 |
pointer-events: none;
|
@@ -74,38 +62,38 @@
|
|
74 |
border-color: var(--border);
|
75 |
background-color: var(--popover);
|
76 |
color: var(--popover-foreground);
|
77 |
-
box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
78 |
outline: none;
|
79 |
transition: opacity 0.3s ease-out, transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
|
80 |
-
opacity: 0;
|
81 |
transform: translateY(-100%) scale(0.9);
|
82 |
pointer-events: none;
|
83 |
|
84 |
-
&.open {
|
85 |
-
opacity: 1;
|
86 |
transform: translateY(0) scale(1);
|
87 |
pointer-events: auto;
|
88 |
}
|
89 |
}
|
90 |
|
91 |
.notification-popover-text-content {
|
92 |
-
background-color: #eff6ff;
|
93 |
-
font-size: 0.875rem;
|
94 |
-
line-height: 1.5rem;
|
95 |
direction: rtl;
|
96 |
-
padding: 1rem;
|
97 |
-
border-radius: var(--radius-md, 0.5rem);
|
98 |
-
color: oklch(0.145 0 0);
|
99 |
}
|
100 |
.dark .notification-popover-text-content {
|
101 |
-
background-color: oklch(0.25 0.05 230);
|
102 |
-
color: oklch(0.95 0.01 230);
|
103 |
}
|
104 |
|
105 |
/* Header controls */
|
106 |
.header-controls {
|
107 |
display: flex;
|
108 |
-
padding: 1rem;
|
109 |
justify-content: space-between;
|
110 |
align-items: center;
|
111 |
width: 100%;
|
@@ -119,30 +107,30 @@
|
|
119 |
display: flex;
|
120 |
align-items: center;
|
121 |
justify-content: center;
|
122 |
-
padding: 0.5rem;
|
123 |
-
border-radius: var(--radius-lg, 0.625rem);
|
124 |
-
background-color: #e5e7eb;
|
125 |
cursor: pointer;
|
126 |
transition: background-color 0.2s;
|
127 |
|
128 |
&:hover {
|
129 |
-
background-color: #d1d5db;
|
130 |
}
|
131 |
|
132 |
svg {
|
133 |
-
opacity: 0.7;
|
134 |
-
stroke: #374151;
|
135 |
}
|
136 |
}
|
137 |
|
138 |
.dark .header-button {
|
139 |
-
background-color: oklch(0.28 0 0);
|
140 |
&:hover {
|
141 |
background-color: oklch(0.35 0 0);
|
142 |
}
|
143 |
svg {
|
144 |
-
opacity: 0.8;
|
145 |
-
stroke: oklch(0.85 0 0);
|
146 |
}
|
147 |
}
|
148 |
|
@@ -150,10 +138,10 @@
|
|
150 |
.footer-controls {
|
151 |
width: 100%;
|
152 |
display: flex;
|
153 |
-
gap: 1rem;
|
154 |
position: absolute;
|
155 |
bottom: 0;
|
156 |
-
padding: 2rem 3rem;
|
157 |
align-items: center;
|
158 |
|
159 |
&.layout-default {
|
@@ -167,28 +155,28 @@
|
|
167 |
.control-button {
|
168 |
height: 80px;
|
169 |
width: 80px;
|
170 |
-
border-radius: 9999px;
|
171 |
padding: 0;
|
172 |
display: flex;
|
173 |
align-items: center;
|
174 |
justify-content: center;
|
175 |
border-width: 1px;
|
176 |
border-color: var(--border);
|
177 |
-
box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
|
178 |
cursor: pointer;
|
179 |
transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
|
180 |
|
181 |
&:hover {
|
182 |
transform: scale(1.05);
|
183 |
-
box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
|
184 |
}
|
185 |
}
|
186 |
|
187 |
.cam-button-color { background-color: #E0ECFF; }
|
188 |
-
.mic-button-color { background-color: #fecdd3;
|
189 |
|
190 |
-
.dark .cam-button-color { background-color: #223355;
|
191 |
-
.dark .mic-button-color { background-color: #5C2129;
|
192 |
|
193 |
/* Switch Camera Button */
|
194 |
.switch-camera-button-container {
|
@@ -196,14 +184,14 @@
|
|
196 |
bottom: calc(100% + 0.65rem);
|
197 |
left: 50%;
|
198 |
z-index: 5;
|
199 |
-
opacity: 0;
|
200 |
transform: translateY(15px) scale(0.7) translateX(-50%);
|
201 |
pointer-events: none;
|
202 |
transition: opacity 0.35s cubic-bezier(0.68, -0.55, 0.27, 1.55), transform 0.35s cubic-bezier(0.68, -0.55, 0.27, 1.55);
|
203 |
transform-origin: center bottom;
|
204 |
|
205 |
&.visible {
|
206 |
-
opacity: 1;
|
207 |
transform: translateY(0) scale(1) translateX(-50%);
|
208 |
pointer-events: auto;
|
209 |
}
|
@@ -214,11 +202,11 @@
|
|
214 |
height: 48px;
|
215 |
background-color: var(--background);
|
216 |
border: 1px solid var(--border);
|
217 |
-
border-radius: 9999px;
|
218 |
display: flex;
|
219 |
align-items: center;
|
220 |
justify-content: center;
|
221 |
-
box-shadow: 0 5px 10px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.08);
|
222 |
cursor: pointer;
|
223 |
transform-origin: center;
|
224 |
transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
|
@@ -243,15 +231,31 @@
|
|
243 |
}
|
244 |
|
245 |
/* Keyframes for popover */
|
|
|
246 |
@keyframes popover-drop-in {
|
247 |
-
|
248 |
-
|
249 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
250 |
}
|
251 |
|
252 |
@keyframes popover-lift-out {
|
253 |
-
|
254 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
255 |
}
|
256 |
|
257 |
/* Classes that use these keyframes */
|
@@ -262,21 +266,7 @@
|
|
262 |
animation: popover-lift-out 0.3s ease-in forwards;
|
263 |
}
|
264 |
|
265 |
-
|
266 |
-
|
267 |
-
اگر این کلاسها در Tailwind شما تعریف نشدهاند، این بخش را میتوانید حذف کنید،
|
268 |
-
چون رنگها مستقیماً در استایلهای بالا یا از طریق متغیرهای CSS اعمال شدهاند.
|
269 |
-
*/
|
270 |
// .bg-blue-200 { background-color: #bfdbfe !important; }
|
271 |
-
//
|
272 |
-
// .bg-blue-400 { background-color: #60a5fa !important; }
|
273 |
-
// .bg-green-200 { background-color: #bbf7d0 !important; }
|
274 |
-
// .bg-green-300 { background-color: #86efac !important; }
|
275 |
-
// .bg-green-400 { background-color: #4ade80 !important; }
|
276 |
-
|
277 |
-
// کلاس antialiased که در body تگ HTML بود، معادل Tailwind برای font-smoothing است.
|
278 |
-
// این مورد توسط @import 'tailwindcss/base'; یا استایل پیشفرض مرورگرها پوشش داده میشود.
|
279 |
-
// .antialiased {
|
280 |
-
// -webkit-font-smoothing: antialiased;
|
281 |
-
// -moz-osx-font-smoothing: grayscale;
|
282 |
-
// }
|
|
|
1 |
// src/App.scss
|
2 |
|
3 |
// 1. Import Tailwind's base, components, and utilities
|
|
|
|
|
4 |
@import 'tailwindcss/base';
|
5 |
@import 'tailwindcss/components';
|
6 |
@import 'tailwindcss/utilities';
|
|
|
14 |
--popover: oklch(1 0 0);
|
15 |
--popover-foreground: oklch(0.145 0 0);
|
16 |
--border: oklch(0.922 0 0);
|
|
|
17 |
}
|
18 |
|
19 |
.dark {
|
|
|
22 |
--popover: oklch(0.205 0 0);
|
23 |
--popover-foreground: oklch(0.985 0 0);
|
24 |
--border: oklch(1 0 0 / 10%);
|
|
|
25 |
}
|
26 |
|
27 |
+
// 3. Apply base styles
|
|
|
|
|
28 |
@layer base {
|
29 |
* {
|
|
|
|
|
|
|
30 |
border-color: var(--border);
|
31 |
+
outline-color: var(--foreground);
|
32 |
}
|
33 |
body {
|
34 |
+
@apply bg-background text-foreground;
|
|
|
|
|
|
|
35 |
overflow-x: hidden;
|
36 |
+
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
37 |
-webkit-font-smoothing: antialiased;
|
38 |
-moz-osx-font-smoothing: grayscale;
|
39 |
}
|
40 |
}
|
41 |
|
42 |
+
// 4. Styles for components
|
43 |
|
44 |
/* Notification Popover */
|
45 |
.notification-popover-wrapper {
|
|
|
49 |
transform: translateX(-50%);
|
50 |
z-index: 100;
|
51 |
width: calc(100% - 2rem);
|
52 |
+
max-width: 28rem;
|
53 |
display: flex;
|
54 |
justify-content: center;
|
55 |
pointer-events: none;
|
|
|
62 |
border-color: var(--border);
|
63 |
background-color: var(--popover);
|
64 |
color: var(--popover-foreground);
|
65 |
+
box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
66 |
outline: none;
|
67 |
transition: opacity 0.3s ease-out, transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
|
68 |
+
opacity: 0; // <--- Corrected: no quotes
|
69 |
transform: translateY(-100%) scale(0.9);
|
70 |
pointer-events: none;
|
71 |
|
72 |
+
&.open {
|
73 |
+
opacity: 1; // <--- Corrected: no quotes
|
74 |
transform: translateY(0) scale(1);
|
75 |
pointer-events: auto;
|
76 |
}
|
77 |
}
|
78 |
|
79 |
.notification-popover-text-content {
|
80 |
+
background-color: #eff6ff;
|
81 |
+
font-size: 0.875rem;
|
82 |
+
line-height: 1.5rem;
|
83 |
direction: rtl;
|
84 |
+
padding: 1rem;
|
85 |
+
border-radius: var(--radius-md, 0.5rem);
|
86 |
+
color: oklch(0.145 0 0);
|
87 |
}
|
88 |
.dark .notification-popover-text-content {
|
89 |
+
background-color: oklch(0.25 0.05 230);
|
90 |
+
color: oklch(0.95 0.01 230);
|
91 |
}
|
92 |
|
93 |
/* Header controls */
|
94 |
.header-controls {
|
95 |
display: flex;
|
96 |
+
padding: 1rem;
|
97 |
justify-content: space-between;
|
98 |
align-items: center;
|
99 |
width: 100%;
|
|
|
107 |
display: flex;
|
108 |
align-items: center;
|
109 |
justify-content: center;
|
110 |
+
padding: 0.5rem;
|
111 |
+
border-radius: var(--radius-lg, 0.625rem);
|
112 |
+
background-color: #e5e7eb;
|
113 |
cursor: pointer;
|
114 |
transition: background-color 0.2s;
|
115 |
|
116 |
&:hover {
|
117 |
+
background-color: #d1d5db;
|
118 |
}
|
119 |
|
120 |
svg {
|
121 |
+
opacity: 0.7; // <--- Corrected: no quotes
|
122 |
+
stroke: #374151;
|
123 |
}
|
124 |
}
|
125 |
|
126 |
.dark .header-button {
|
127 |
+
background-color: oklch(0.28 0 0);
|
128 |
&:hover {
|
129 |
background-color: oklch(0.35 0 0);
|
130 |
}
|
131 |
svg {
|
132 |
+
opacity: 0.8; // <--- Corrected: no quotes
|
133 |
+
stroke: oklch(0.85 0 0);
|
134 |
}
|
135 |
}
|
136 |
|
|
|
138 |
.footer-controls {
|
139 |
width: 100%;
|
140 |
display: flex;
|
141 |
+
gap: 1rem;
|
142 |
position: absolute;
|
143 |
bottom: 0;
|
144 |
+
padding: 2rem 3rem;
|
145 |
align-items: center;
|
146 |
|
147 |
&.layout-default {
|
|
|
155 |
.control-button {
|
156 |
height: 80px;
|
157 |
width: 80px;
|
158 |
+
border-radius: 9999px;
|
159 |
padding: 0;
|
160 |
display: flex;
|
161 |
align-items: center;
|
162 |
justify-content: center;
|
163 |
border-width: 1px;
|
164 |
border-color: var(--border);
|
165 |
+
box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
|
166 |
cursor: pointer;
|
167 |
transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
|
168 |
|
169 |
&:hover {
|
170 |
transform: scale(1.05);
|
171 |
+
box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
|
172 |
}
|
173 |
}
|
174 |
|
175 |
.cam-button-color { background-color: #E0ECFF; }
|
176 |
+
.mic-button-color { background-color: #fecdd3; }
|
177 |
|
178 |
+
.dark .cam-button-color { background-color: #223355; }
|
179 |
+
.dark .mic-button-color { background-color: #5C2129; }
|
180 |
|
181 |
/* Switch Camera Button */
|
182 |
.switch-camera-button-container {
|
|
|
184 |
bottom: calc(100% + 0.65rem);
|
185 |
left: 50%;
|
186 |
z-index: 5;
|
187 |
+
opacity: 0; // <--- Corrected: no quotes
|
188 |
transform: translateY(15px) scale(0.7) translateX(-50%);
|
189 |
pointer-events: none;
|
190 |
transition: opacity 0.35s cubic-bezier(0.68, -0.55, 0.27, 1.55), transform 0.35s cubic-bezier(0.68, -0.55, 0.27, 1.55);
|
191 |
transform-origin: center bottom;
|
192 |
|
193 |
&.visible {
|
194 |
+
opacity: 1; // <--- Corrected: no quotes
|
195 |
transform: translateY(0) scale(1) translateX(-50%);
|
196 |
pointer-events: auto;
|
197 |
}
|
|
|
202 |
height: 48px;
|
203 |
background-color: var(--background);
|
204 |
border: 1px solid var(--border);
|
205 |
+
border-radius: 9999px;
|
206 |
display: flex;
|
207 |
align-items: center;
|
208 |
justify-content: center;
|
209 |
+
box-shadow: 0 5px 10px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.08);
|
210 |
cursor: pointer;
|
211 |
transform-origin: center;
|
212 |
transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
|
|
|
231 |
}
|
232 |
|
233 |
/* Keyframes for popover */
|
234 |
+
// Corrected: percentages and opacity values are not quoted
|
235 |
@keyframes popover-drop-in {
|
236 |
+
0% { // <--- Corrected
|
237 |
+
opacity: 0;
|
238 |
+
transform: translateY(-100%) scale(0.9);
|
239 |
+
}
|
240 |
+
70% { // <--- Corrected
|
241 |
+
opacity: 1;
|
242 |
+
transform: translateY(5px) scale(1.02); /* Slight overshoot */
|
243 |
+
}
|
244 |
+
100% { // <--- Corrected
|
245 |
+
opacity: 1;
|
246 |
+
transform: translateY(0) scale(1);
|
247 |
+
}
|
248 |
}
|
249 |
|
250 |
@keyframes popover-lift-out {
|
251 |
+
0% { // <--- Corrected
|
252 |
+
opacity: 1;
|
253 |
+
transform: translateY(0) scale(1);
|
254 |
+
}
|
255 |
+
100% { // <--- Corrected
|
256 |
+
opacity: 0;
|
257 |
+
transform: translateY(-100%) scale(0.9);
|
258 |
+
}
|
259 |
}
|
260 |
|
261 |
/* Classes that use these keyframes */
|
|
|
266 |
animation: popover-lift-out 0.3s ease-in forwards;
|
267 |
}
|
268 |
|
269 |
+
// Utility overrides are generally not needed if Tailwind is configured correctly.
|
270 |
+
// These were previously commented out and can remain so.
|
|
|
|
|
|
|
271 |
// .bg-blue-200 { background-color: #bfdbfe !important; }
|
272 |
+
// ...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|