form-number-input.scss 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. @import '../../bootstrap-extended/include'; // Bootstrap includes
  2. @import '../../components/include'; // Components includes
  3. // Number Inputs (Touch spin)
  4. $bootstrap-touchspin-width: 8.4rem;
  5. $bootstrap-touchspin-width-lg: 9.375rem;
  6. $bootstrap-touchspin-width-sm: 6.25rem;
  7. $bootstrap-touchspin-btn-width: 20px;
  8. $bootstrap-touchspin-btn-height: 20px;
  9. $bootstrap-touchspin-btn-width-lg: 24px;
  10. $bootstrap-touchspin-btn-height-lg: 24px;
  11. $bootstrap-touchspin-btn-width-sm: 16px;
  12. $bootstrap-touchspin-btn-height-sm: 16px;
  13. /* Bootstrap Touchspin */
  14. .bootstrap-touchspin {
  15. &.input-group {
  16. width: $bootstrap-touchspin-width;
  17. align-items: center;
  18. .form-control {
  19. padding: 5px;
  20. height: auto;
  21. border: 0;
  22. background-color: $body-bg;
  23. border-radius: $border-radius !important;
  24. text-align: center;
  25. font-weight: 500;
  26. &:focus {
  27. z-index: 1;
  28. box-shadow: none;
  29. }
  30. }
  31. }
  32. .bootstrap-touchspin-injected {
  33. margin: 0 !important;
  34. &.input-group-prepend {
  35. left: 12px;
  36. position: relative;
  37. }
  38. &.input-group-append {
  39. right: 12px;
  40. position: relative;
  41. }
  42. .bootstrap-touchspin-down,
  43. .bootstrap-touchspin-up {
  44. padding: 0;
  45. min-width: $bootstrap-touchspin-btn-width;
  46. min-height: $bootstrap-touchspin-btn-width;
  47. border-radius: $border-radius !important;
  48. i,
  49. svg {
  50. height: 0.8rem;
  51. width: 0.8rem;
  52. font-size: 0.8rem;
  53. position: relative;
  54. top: -1px;
  55. }
  56. }
  57. }
  58. // Disabled Touchspin
  59. &.disabled-touchspin {
  60. .bootstrap-touchspin-down,
  61. .bootstrap-touchspin-up {
  62. background-color: rgba($black, 0.5) !important;
  63. cursor: default;
  64. opacity: 0.5;
  65. }
  66. }
  67. // Touchspin Large
  68. &.input-group-lg {
  69. width: $bootstrap-touchspin-width-lg;
  70. .touchspin {
  71. &.form-control {
  72. height: auto !important;
  73. }
  74. }
  75. .bootstrap-touchspin-down,
  76. .bootstrap-touchspin-up {
  77. min-width: $bootstrap-touchspin-btn-width-lg;
  78. min-height: $bootstrap-touchspin-btn-width-lg;
  79. i,
  80. svg {
  81. height: 1rem;
  82. width: 1rem;
  83. font-size: 1rem;
  84. top: -3px;
  85. }
  86. }
  87. }
  88. // Touchspin Small
  89. &.input-group-sm {
  90. width: $bootstrap-touchspin-width-sm;
  91. .touchspin {
  92. &.form-control {
  93. height: auto !important;
  94. }
  95. }
  96. .bootstrap-touchspin-injected {
  97. .bootstrap-touchspin-down,
  98. .bootstrap-touchspin-up {
  99. min-width: $bootstrap-touchspin-btn-width-sm;
  100. min-height: $bootstrap-touchspin-btn-width-sm;
  101. i,
  102. svg {
  103. height: 0.6rem;
  104. width: 0.6rem;
  105. font-size: 0.6rem;
  106. }
  107. }
  108. }
  109. }
  110. }
  111. /* Number Type Input Box Scss for Touchspin - Remove arrow for firefox */
  112. .bootstrap-touchspin {
  113. &.input-group {
  114. input[type='number'] {
  115. -moz-appearance: textfield;
  116. }
  117. }
  118. }
  119. // Dark layout style
  120. .dark-layout {
  121. // number inputs[touchspin]
  122. .bootstrap-touchspin {
  123. &.input-group {
  124. .form-control {
  125. background-color: $theme-dark-body-bg;
  126. }
  127. }
  128. &.disabled-touchspin {
  129. .bootstrap-touchspin-injected {
  130. .bootstrap-touchspin-down,
  131. .bootstrap-touchspin-up,
  132. .disabled-max-min {
  133. background-color: $gray-600 !important;
  134. opacity: 1;
  135. }
  136. }
  137. }
  138. .bootstrap-touchspin-injected {
  139. .disabled-max-min {
  140. background-color: $gray-600 !important;
  141. opacity: 1;
  142. }
  143. }
  144. }
  145. }