keyboard.css 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /* keyboard - jQuery UI Widget */
  2. .ui-keyboard { padding: .3em; position: absolute; left: 0; top: 0; z-index: 16000; }
  3. .ui-keyboard-has-focus { z-index: 16001; }
  4. .ui-keyboard div { font-size: 1.1em; }
  5. .ui-keyboard-button { height: 2em; width: 2em; min-width: 1em; margin: .1em; cursor: pointer; overflow: hidden; line-height: 2em; -moz-user-focus: ignore; }
  6. .ui-keyboard-button span { padding: 0; margin: 0; white-space:nowrap; display: inline-block; }
  7. .ui-keyboard-button-endrow { clear: left; }
  8. .ui-keyboard-widekey { min-width: 4em; width: auto; }
  9. .ui-keyboard-space { width: 15em; }
  10. .ui-keyboard-space span, .ui-keyboard-empty span { font: 0/0 a; text-shadow: none; color: transparent; } /* see http://nicolasgallagher.com/another-css-image-replacement-technique/ */
  11. .ui-keyboard-preview-wrapper { text-align: center; }
  12. .ui-keyboard-preview { text-align: left; margin: 0 0 3px 0; display: inline; width: 99%;} /* width is calculated in IE, since 99% = 99% full browser width =( */
  13. .ui-keyboard-keyset { text-align: center; white-space: nowrap; }
  14. .ui-keyboard-input { text-align: left; }
  15. .ui-keyboard-input-current { -moz-box-shadow: 1px 1px 10px #00f; -webkit-box-shadow: 1px 1px 10px #00f; box-shadow: 1px 1px 10px #00f; }
  16. .ui-keyboard-placeholder { color: #888; }
  17. .ui-keyboard-nokeyboard { color: #888; border-color: #888; } /* disabled or readonly inputs, or use input[disabled='disabled'] { color: #f00; } */
  18. .ui-keyboard-button.disabled { opacity: 0.5; filter: alpha(opacity=50); } /* used by the acceptValid option to make the accept button appear faded */
  19. .ui-keyboard-spacer { display: inline-block; width: 1px; height: 0; }
  20. /* combo key styling - toggles diacritics on/off */
  21. .ui-keyboard-button.ui-keyboard-combo.ui-state-default { border-color: #ffaf0f; }
  22. /* (in)valid inputs */
  23. button.ui-keyboard-accept.ui-keyboard-valid-input { border-color: #0c0; background: #080; color: #fff; }
  24. button.ui-keyboard-accept.ui-keyboard-valid-input:hover { background: #0a0; }
  25. button.ui-keyboard-accept.ui-keyboard-invalid-input { border-color: #c00; background: #800; color: #fff; }
  26. button.ui-keyboard-accept.ui-keyboard-invalid-input:hover { background: #a00; }
  27. /*** jQuery Mobile definitions ***/
  28. /* jQuery Mobile styles - need wider buttons because of font size and text-overflow:ellipsis */
  29. .ui-bar .ui-keyboard-button { width: 3em; display: inline-block; }
  30. .ui-bar .ui-keyboard-widekey { width: 5.5em; }
  31. .ui-bar .ui-keyboard-space { width: 15em; }
  32. .ui-bar .ui-keyboard-space span { visibility: hidden; } /* hides the ellipsis */
  33. .ui-bar .ui-keyboard-keyset { line-height: 0.5em; }
  34. .ui-bar input.ui-input-text, .ui-bar textarea.ui-input-text { width: 95%; }
  35. /* over-ride padding set by mobile ui theme - needed because the mobile script wraps button text with several more spans */
  36. .ui-bar .ui-btn-inner { height: 2em; padding: 0.2em 0; margin: 0; }
  37. .ui-bar .ui-btn { margin: 0; font-size: 13px; } /* mobile default size is 13px */
  38. /* Media Queries (optimized for jQuery UI themes; may be slightly off in jQuery Mobile themes) */
  39. /* 240 x 320 (small phone) */
  40. @media all and (max-width: 319px) {
  41. .ui-keyboard div { font-size: 9px; }
  42. .ui-keyboard .ui-keyboard-input { font-size: 12px; }
  43. /* I don't own an iPhone so I have no idea how small this really is... is it even clickable with your finger? */
  44. .ui-bar .ui-btn { margin: 0; font-size: 9px; }
  45. .ui-bar .ui-keyboard-button { width: 1.8em; height: 2.5em; }
  46. .ui-bar .ui-keyboard-widekey { width: 4em; }
  47. .ui-bar .ui-keyboard-space { width: 8em; }
  48. .ui-bar .ui-btn-inner { height: 2.5em; padding: 0.3em 0; }
  49. }
  50. /* 320 x 480 (iPhone) */
  51. @media all and (min-width: 320px) and (max-width: 479px) {
  52. .ui-keyboard div { font-size: 9px; }
  53. .ui-keyboard .ui-keyboard-input { font-size: 14px; }
  54. /* I don't own an iPhone so I have no idea how small this really is... is it even clickable with your finger? */
  55. .ui-bar .ui-btn { margin: 0; font-size: 11px; }
  56. .ui-bar .ui-keyboard-button { width: 1.8em; height: 3em; }
  57. .ui-bar .ui-keyboard-widekey { width: 4.5em; }
  58. .ui-bar .ui-keyboard-space { width: 10em; }
  59. .ui-bar .ui-btn-inner { height: 3em; padding: 0.7em 0; }
  60. }
  61. /* 480 x 640 (small tablet) */
  62. @media all and (min-width: 480px) and (max-width: 767px) {
  63. .ui-keyboard div { font-size: 13px; }
  64. .ui-keyboard .ui-keyboard-input { font-size: 14px; }
  65. .ui-bar .ui-btn { margin: 0; font-size: 10px; }
  66. .ui-bar .ui-keyboard-button { height: 2.5em; }
  67. .ui-bar .ui-btn-inner { height: 2.5em; padding: 0.5em 0; }
  68. }