VirtualKeyboard.css 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*
  2. * Dark theme for react-simple-keyboard — matches bambu-dark / bambu-green palette.
  3. * Tailwind v4 preflight resets button display/flex, so we must explicitly
  4. * restore the layout that react-simple-keyboard expects.
  5. */
  6. .simple-keyboard.vkb-theme {
  7. background: #1a1a1a;
  8. border-top: 1px solid #333;
  9. padding: 8px 4px;
  10. font-family: inherit;
  11. }
  12. /* Row layout — Tailwind preflight strips flex from generic elements */
  13. .simple-keyboard.vkb-theme .hg-row {
  14. display: flex !important;
  15. flex-direction: row !important;
  16. flex-wrap: nowrap !important;
  17. gap: 4px;
  18. margin-bottom: 4px;
  19. }
  20. .simple-keyboard.vkb-theme .hg-row:last-child {
  21. margin-bottom: 0;
  22. }
  23. /* Key buttons — must restore inline-flex sizing */
  24. .simple-keyboard.vkb-theme .hg-button {
  25. display: inline-flex !important;
  26. align-items: center;
  27. justify-content: center;
  28. flex-grow: 1;
  29. flex-shrink: 1;
  30. flex-basis: auto;
  31. background: #2d2d2d;
  32. color: #e0e0e0;
  33. border: none;
  34. border-radius: 6px;
  35. height: 44px;
  36. font-size: 16px;
  37. font-weight: 500;
  38. box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  39. transition: background 0.1s;
  40. cursor: pointer;
  41. padding: 0 2px;
  42. min-width: 0;
  43. }
  44. .simple-keyboard.vkb-theme .hg-button:active {
  45. background: #00ae42;
  46. color: #fff;
  47. }
  48. /* Functional keys */
  49. .simple-keyboard.vkb-theme .hg-button-bksp,
  50. .simple-keyboard.vkb-theme .hg-button-shift,
  51. .simple-keyboard.vkb-theme .hg-button-lock {
  52. background: #3a3a3a;
  53. color: #aaa;
  54. flex-grow: 1.5;
  55. }
  56. .simple-keyboard.vkb-theme .hg-button-close {
  57. background: #3a3a3a;
  58. color: #aaa;
  59. flex-grow: 2;
  60. font-weight: 600;
  61. }
  62. .simple-keyboard.vkb-theme .hg-button-close:active {
  63. background: #555;
  64. }
  65. .simple-keyboard.vkb-theme .hg-button-space {
  66. flex-grow: 7;
  67. }
  68. /* Active shift/caps indicator */
  69. .simple-keyboard.vkb-theme .hg-activeButton {
  70. background: #00ae42;
  71. color: #fff;
  72. }