|
2 | 2 | <html lang="vi"> |
3 | 3 | <head> |
4 | 4 | <meta charset="UTF-8"> |
5 | | -<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 5 | +<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=yes, viewport-fit=cover"> |
| 6 | +<meta name="apple-mobile-web-app-capable" content="yes"> |
| 7 | +<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> |
| 8 | +<meta name="theme-color" content="#0d0f14"> |
6 | 9 | <title>Convolution 2D Calculator</title> |
7 | 10 | <link rel="preconnect" href="https://fonts.googleapis.com"> |
8 | 11 | <link href="https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=DM+Sans:wght@300;400;500;600&display=swap" rel="stylesheet"> |
|
81 | 84 | z-index: 1; |
82 | 85 | max-width: 960px; |
83 | 86 | margin: 0 auto; |
| 87 | + width: 100%; |
| 88 | + overflow-x: hidden; |
84 | 89 | } |
85 | 90 |
|
86 | 91 | .theme-toggle { |
|
99 | 104 | display: flex; |
100 | 105 | align-items: center; |
101 | 106 | gap: 6px; |
| 107 | + min-height: 44px; |
| 108 | + min-width: 44px; |
| 109 | + touch-action: manipulation; |
| 110 | + -webkit-touch-callout: none; |
102 | 111 | } |
103 | 112 |
|
104 | 113 | .theme-toggle:hover { |
|
282 | 291 | .matrix-grid { |
283 | 292 | display: grid; |
284 | 293 | gap: 5px; |
| 294 | + overflow-x: auto; |
| 295 | + overflow-y: hidden; |
| 296 | + -webkit-overflow-scrolling: touch; |
| 297 | + padding-bottom: 4px; |
285 | 298 | } |
286 | 299 |
|
287 | 300 | .matrix-grid input[type=number] { |
|
294 | 307 | border-radius: 6px; |
295 | 308 | padding: 8px 4px; |
296 | 309 | width: 100%; |
297 | | - min-width: 0; |
| 310 | + min-width: 44px; |
| 311 | + min-height: 44px; |
| 312 | + height: 44px; |
298 | 313 | outline: none; |
299 | 314 | transition: border-color 0.2s, background 0.2s; |
300 | 315 | -moz-appearance: textfield; |
| 316 | + flex-shrink: 0; |
301 | 317 | } |
302 | 318 |
|
303 | 319 | .matrix-grid input[type=number]::-webkit-inner-spin-button, |
|
307 | 323 | .matrix-grid input[type=number]:focus { |
308 | 324 | border-color: var(--accent); |
309 | 325 | background: var(--accent-dim2); |
| 326 | + outline: 2px solid var(--accent); |
| 327 | + outline-offset: -4px; |
310 | 328 | } |
311 | 329 |
|
312 | 330 | .btn-calc { |
|
328 | 346 | max-width: 360px; |
329 | 347 | margin: 1.75rem auto 0; |
330 | 348 | transition: opacity 0.2s, transform 0.15s, background 0.3s; |
| 349 | + min-height: 44px; |
| 350 | + touch-action: manipulation; |
| 351 | + -webkit-touch-callout: none; |
| 352 | + user-select: none; |
331 | 353 | } |
332 | 354 |
|
333 | 355 | .btn-calc:hover { opacity: 0.9; } |
|
359 | 381 | gap: 5px; |
360 | 382 | width: 100%; |
361 | 383 | overflow-x: auto; |
| 384 | + overflow-y: hidden; |
362 | 385 | padding-bottom: 2px; |
| 386 | + -webkit-overflow-scrolling: touch; |
363 | 387 | } |
364 | 388 |
|
365 | 389 | .out-cell { |
|
373 | 397 | color: var(--accent); |
374 | 398 | cursor: pointer; |
375 | 399 | transition: all 0.2s; |
376 | | - min-width: 0; |
| 400 | + min-width: 44px; |
377 | 401 | min-height: 38px; |
378 | 402 | display: flex; |
379 | 403 | align-items: center; |
380 | 404 | justify-content: center; |
| 405 | + flex-shrink: 0; |
| 406 | + -webkit-touch-callout: none; |
| 407 | + user-select: none; |
381 | 408 | } |
382 | 409 |
|
383 | 410 | .out-cell:hover, .out-cell.active { |
|
396 | 423 | padding: 1rem 1.2rem; |
397 | 424 | transition: border-color 0.2s, background 0.2s; |
398 | 425 | cursor: default; |
| 426 | + touch-action: manipulation; |
| 427 | + -webkit-tap-highlight-color: transparent; |
399 | 428 | } |
400 | 429 |
|
401 | 430 | .step-card.active { |
|
531 | 560 | gap: 3px; |
532 | 561 | } |
533 | 562 | .matrix-grid input[type=number] { |
| 563 | + min-width: 40px; |
| 564 | + min-height: 40px; |
| 565 | + height: 40px; |
534 | 566 | padding: 6px 3px; |
535 | 567 | font-size: 0.85rem; |
536 | 568 | } |
|
576 | 608 | font-size: 0.7rem; |
577 | 609 | padding: 4px 8px; |
578 | 610 | min-width: 50px; |
| 611 | + touch-action: manipulation; |
579 | 612 | } |
580 | 613 | .btn-ghost { |
581 | 614 | font-size: 0.65rem; |
582 | 615 | padding: 4px 8px; |
| 616 | + -webkit-touch-callout: none; |
| 617 | + touch-action: manipulation; |
583 | 618 | } |
584 | 619 | .btn-calc { |
585 | 620 | padding: 0.8rem 1.5rem; |
586 | 621 | font-size: 0.8rem; |
587 | 622 | max-width: 100%; |
588 | 623 | margin: 1rem auto 0; |
| 624 | + -webkit-touch-callout: none; |
| 625 | + touch-action: manipulation; |
589 | 626 | } |
590 | 627 | .matrix-grid { |
591 | 628 | gap: 2px; |
592 | 629 | } |
593 | 630 | .matrix-grid input[type=number] { |
594 | | - padding: 5px 2px; |
| 631 | + min-width: 36px; |
| 632 | + min-height: 36px; |
| 633 | + height: 36px; |
| 634 | + padding: 4px 2px; |
595 | 635 | font-size: 0.8rem; |
596 | 636 | } |
597 | 637 | .result-grid { |
|
611 | 651 | .detail-box { |
612 | 652 | font-size: 0.65rem; |
613 | 653 | padding: 6px 8px; |
| 654 | + overflow-x: auto; |
| 655 | + -webkit-overflow-scrolling: touch; |
614 | 656 | } |
615 | 657 | .step-result { |
616 | 658 | font-size: 0.8rem; |
|
649 | 691 | padding: 0.7rem 1rem; |
650 | 692 | font-size: 0.75rem; |
651 | 693 | } |
| 694 | + .matrix-grid { |
| 695 | + gap: 2px; |
| 696 | + } |
| 697 | + .matrix-grid input[type=number] { |
| 698 | + min-width: 32px; |
| 699 | + min-height: 32px; |
| 700 | + height: 32px; |
| 701 | + padding: 3px 1px; |
| 702 | + font-size: 0.75rem; |
| 703 | + } |
652 | 704 | } |
653 | 705 |
|
654 | 706 | footer { |
|
0 commit comments